Advertisement
smeacham

Convert this to a single for loop

Nov 6th, 2012
336
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.11 KB | None | 0 0
  1. i=0;
  2. while(i<lim-1) {
  3.   if((c=getchar()) != '\n') {
  4.     if(c != EOF) {
  5.       s[i] = c;
  6.     }
  7.   }
  8.   i++;
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement