fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. // Pattern 6
  6. int n;
  7. cin>>n;
  8. for(int i=n;i>=1;i--)
  9. {
  10. for(int j=1;j<=i;j++)
  11. {
  12. cout<<j;
  13. }
  14.  
  15. cout<<"\n";
  16. }
  17. return 0;
  18. }
Success #stdin #stdout 0s 5436KB
stdin
5
stdout
12345
1234
123
12
1