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