Advertisement
J2112O

Nested For Loop Help

May 25th, 2015
327
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.23 KB | None | 0 0
  1.   2 #include <stdio.h>                                                              
  2.   3 #include <stdlib.h>                                                            
  3.   4 int main(void)                                                                                                        
  4.   5 {                                                                              
  5.   6     int row;                                                                    
  6.   7     int ch;                                                                    
  7.   8     char ch1 = 'F';                                                            
  8.   9     for(row=1; row<=6; row++) {                                                
  9.  10         for(ch=1; ch<=row; ch++)                                                
  10.  11                                                                                
  11.  12             printf("%c", ch1);                                                  
  12.  13         printf("\n");                                                          
  13.  14     }                                                                          
  14.  15     return 0;                                                                  
  15.  16 }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement