fork download
  1. #include <iostream>
  2. using namespace std;
  3. int main()
  4. {
  5. int x=5,y=1;
  6.  
  7. while (y<=x)
  8. {
  9. for(int i=y; i>=1; i--)
  10. {
  11.  
  12. cout<<i<<' ';
  13. }
  14. y++;
  15. cout<<endl;
  16. }
  17. return 0;
  18. }
Success #stdin #stdout 0.01s 5428KB
stdin
Standard input is empty
stdout
1 
2 1 
3 2 1 
4 3 2 1 
5 4 3 2 1