Advertisement
capncoolio

compare space

Jun 5th, 2012
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.20 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <string.h>
  3.  
  4. int main() {
  5.     char a[64];
  6.     fgets(a, 64, stdin);
  7.     for(int i = 0; i < strlen(a); i++) {
  8.         if(a[i] == ' ') {
  9.             printf("Pos: %d", i);
  10.             break;
  11.         }
  12.     }
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement