fork download
  1. #include <stdio.h>
  2. int main(){
  3. int i,j,k=1;
  4. for(i=5;i>=1;i--){
  5. for(j=1;j<=i;j++){
  6. printf("%d ",k++);
  7. }
  8. printf("\n");
  9. }
  10. return 0;
  11. }
Success #stdin #stdout 0s 5304KB
stdin
Standard input is empty
stdout
1 2 3 4 5 
6 7 8 9 
10 11 12 
13 14 
15