Tuesday, March 1, 2016

Floyd's Triangle in C

1:  #include <stdio.h>  
2:  int main(){  
3:              int i,j,a=1;  
4:      for(i=1;i<=10; i++){  
5:        
6:          for(j=1; j<=i; j++){  
7:              printf("%d",a);  
8:              a++;  
9:          }  
10:          printf("\n");  
11:      }  
12:  }  

No comments:

Post a Comment

Thank you for commenting. Please wait for response :)