生死无说

导航

输入一连串数字,遇到回车就停止输入

/*输入一连串数字,遇到回车就停止输入*/ 


#include<stdio.h>
#include<stdlib.h>
#include<math.h>
#include<string.h>
int main()
{
    int a[101];
    int i=0,j=0,k=0,z=0;
    do{
        i++;
        scanf("%d",&a[i]);
        printf("%d\n",a[i]) ;
    } while(getchar()!='\n');    //如果遇到回车就停止 输入 
} 

 

posted on 2020-07-01 18:19  只是很想你  阅读(765)  评论(0编辑  收藏  举报