Advertisement
thenewboston

C Programming Tutorial - 27 - for Loops

Aug 22nd, 2014
476
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.28 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <ctype.h>
  4. #include <string.h>
  5. #include <math.h>
  6.  
  7. int main()
  8. {
  9.     int bacon;
  10.  
  11.     for(bacon=1; bacon<=10; bacon++){
  12.         printf("Bacon is %d \n", bacon);
  13.     }
  14.  
  15.     //can also count by 8's using bacon +=8
  16.  
  17.     return 0;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement