标签:string head while 16px ane panel color size body
I am a student
student
1 #include <stdio.h> 2 #include <string.h> 3 int main() 4 { 5 char a[100005], b[100005]; 6 int i, num = 0; 7 while (scanf("%s", &a) != EOF) { 8 if (num < strlen(a)) { 9 num = strlen(a); 10 for (i = 0; i < num; i++) b[i] = a[i]; 11 } 12 puts(a);//参考 13 } 14 puts(b); 15 return 0; 16 }
输入
I am a student
输出
I am a student
I
am
a
student
^Z
student
标签:string head while 16px ane panel color size body
原文地址:https://www.cnblogs.com/rongrongrong/p/14341839.html