23 lines
422 B
C
23 lines
422 B
C
#include <stdio.h>
|
|
#include <string.h>
|
|
|
|
int main() {
|
|
int N;
|
|
char str[52];
|
|
|
|
scanf("%d",&N);
|
|
getchar();
|
|
|
|
for(int i=1; i<=N; i++) {
|
|
fgets(str, sizeof(str), stdin);
|
|
|
|
// int j = 0;
|
|
// while(str[j] != '\n' && str[j] != '\0') j++;
|
|
// if(str[j] == '\n') str[j] = '\0';
|
|
|
|
str[strcspn(str, "\n")] = '\0';
|
|
printf("%d. %s\n",i,str);
|
|
}
|
|
|
|
return 0;
|
|
} |