#include<stdio.h>int main(){int i,j,n;scanf("%d",&n);for(i=1;i<=n;i++){ for(j=n-i+1;j<=n;j++){ printf("%d ",j); } printf("\n");} return 0; }
10
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
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!