You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Test_C/2.2.txt

23 lines
357 B

#include <stdio.h>
int lim = 10;
int main()
{
int i, c;
char s[lim];
i = 0;
while (i < lim-1){
c = getchar();
if (с == EOF)
break;
else if (с == '\n')
break;
else
s[i] = c;
++i;
}
s[i] = '\0';
//for (i = 0; i < lim-1 && (с = getchar()) != EOF && с != '\n'; ++i)
//s[i] = c;
}