#include<stdio.h>
int main(){
int a[10];
int n = 0, i;
char ch=0;
while (ch != ‘\n‘){
scanf_s("%d",&a[n]);
ch = getchar();
n++;
}
for (i = 0; i < n; i++)
printf("%d ", a[i]);
printf("\n");
return 0;
}
时间: 2024-10-07 05:06:44
#include<stdio.h>
int main(){
int a[10];
int n = 0, i;
char ch=0;
while (ch != ‘\n‘){
scanf_s("%d",&a[n]);
ch = getchar();
n++;
}
for (i = 0; i < n; i++)
printf("%d ", a[i]);
printf("\n");
return 0;
}