RenHao

eTutor_8

Sep 25th, 2015
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.50 KB | None | 0 0
  1. #include <stdlib.h>
  2. #include <stdio.h>
  3. #include <string.h>
  4. int main(int argc, const char * argv[])
  5. {
  6.     int n = 0 , cnt = 0 , Index = 0 , i = 0;
  7.     scanf("%d",&n);
  8.     char Sentence[2000][1000];
  9.     for(cnt = 0; cnt <n; cnt++)
  10.     {
  11.         scanf("%d",&Index);
  12.         gets(Sentence[Index]);
  13.     }
  14.     for(i = 0; i<strlen(Sentence[1]); i++)
  15.         Sentence[1][i] = Sentence[1][i+1];
  16.     for(i = 1; i<=cnt; i++)  //cnt = n+1
  17.         printf("%s",Sentence[i]);
  18.     printf(".\n");
  19.     return 0;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment