fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. // your code goes here
  6. int n;
  7. cin >> n;
  8.  
  9. for (int i = 0; i <=n-1; i++) {
  10. for (int j = 0; j < n - i; j++) {
  11. cout << n - i;
  12. }
  13. cout << endl;
  14. }
  15. return 0;
  16. }
Success #stdin #stdout 0s 5320KB
stdin
4
stdout
4444
333
22
1