数组
1 #include <stdio.h>
2
3 int main(){
4 int a[
10]={
5,
3,
2,
6,
8,
4};
5 int i;
6 for(i=
0;i<
10;i++
){
7 printf(
"a[%d]=%d\n",i,a[i]);
8
9 }
10 return 0;
11 }
定义一维数组
int a[10];
double db[2333];
char str[100000];
bool HashTable[1000000];
1 #include <stdio.h>
2
3 int main(){
4 int a[
10];
5 scanf(
"%d",&a[
0]);
6 int i,j;
7 /*输入数据*/
8 for(i=
1;i<
10;i++
){
9 a[i]=a[i-
1]*
2;
10 }
11
12 /*输出数据*/
13 for(j=
0;j<
10;j++
){
14 printf(
"a[%d]=%d\n",j,a[j]);
15 }
16 return 0;
17 }
2的幂
转载于:https://www.cnblogs.com/Catherinezhilin/p/11132502.html
转载请注明原文地址: https://mac.8miu.com/read-71198.html