#include <iostream>
#include<string.h>
#include<math.h>
#include<stdio.h>
#include<stdlib.h>
using namespace std;
int main() //怎样连续读入,使用getchar();
{
char a[10];
char e;
memset(a,0,sizeof(a));
int i=0;
e=getchar();
while(e!= '\n')
{
a[i]=e;
e=getchar();
i++;
}
puts(a);
return 0;
}
while()连续读入字符
最新推荐文章于 2022-07-29 16:22:41 发布