#include<stdio.h>
int main()
{
int arr[10] = { 0,1,2,3,4,5,6,7,8,9 };
//数组的下标从0开始,arr[0]开始
int i = 0;
int arr1[10];
while (i < 10)
{
arr1[i] = i;
printf("%d ", arr1[i]);
i++;
}
return 0;
}
#include<stdio.h>
int main()
{
int arr[10] = { 0,1,2,3,4,5,6,7,8,9 };
//数组的下标从0开始,arr[0]开始
int i = 0;
int arr1[10];
while (i < 10)
{
arr1[i] = i;
printf("%d ", arr1[i]);
i++;
}
return 0;
}
评论区