fork download
  1. #include <stdio.h>
  2. int main()
  3. {
  4. int n;
  5. char b[51];
  6.  
  7. scanf("%d", &n);
  8.  
  9. for (int i = 1; i <= n; i++)
  10. {
  11. getchar();
  12. scanf("%[^\n]s", b);
  13. printf("%d. %s\n",i,b);
  14. }
  15. return 0;
  16. }
  17.  
Success #stdin #stdout 0.01s 5288KB
stdin
5
Lionel Cosgrove
Alice
Columbus and Tallahassee
Shaun and Ed
Fido
stdout
1. Lionel Cosgrove
2. Alice
3. Columbus and Tallahassee
4. Shaun and Ed
5. Fido