Advertisement
Guest User

Sorszámlálás

a guest
Feb 26th, 2017
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <string.h>
  4.  
  5. int main()
  6. {
  7. int i=1;
  8. char szo1[30], szo2[30];
  9. gets(szo1);
  10.  
  11. while ( gets(szo2) )
  12. {
  13. i++;
  14. if ( (strcmp( szo1 , szo2 ) ) == 0 ) {printf("%d\n",i); break; }
  15.  
  16. }
  17.  
  18. return 0;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement