c# - 如何在二维数组中声明和存储值?
问题描述
我试图打印每对元素,而它是阶乘语言:language-c
#include<studio library>//
in main function I try to store 2D array which size is
a[1][3];
And, I write these code
integer a[1][3] = {1,2,3,4,5};
and I find factorial of 5 = 120
I have to print three element together
it is possible 120 times;
so ,I can try 120 different value using print function function
in a[1][3];
like this output
1,2,3 is 1.
1,2,4 is 2.
1,2,5 is 3.
1,3,4 is 4.
1,3,5 up to 120
我想知道如何将值存储在二维数组中,但数组是 a[1][3]
解决方案
您可以将 j 和 k 的值设置为“i-dependent”,但它们不会更新它们的值,您应该在 i++ 旁边添加一个 j++,k++
推荐阅读
- snowflake-cloud-data-platform - 是否可以在 UDF 中调用 javascript 过程 API?
- java - 将数据插入 Derby 数据库的问题
- java - 我应该使用什么类似框的视图?
- ios - 默认协议扩展中的方法总是在单元测试中执行
- angular - Ngrx 8 - 如果条件有多个动作有效,则分派多个 else
- python - 如何从 Google Colab 笔记本中的 gmplot draw 命令查看 html 输出文件?
- r - 如何在 R 中对多个参数进行 ANOVA 测试
- php - Symfony 的虚拟主机配置
- reactjs - 如何在反应中使用功能组件单击按钮时显示组件
- python-3.x - catalina:emacs、python 和键盘输入(使用psychopy)