fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. // ques1
  6. int n ;
  7. cin>>n;
  8. for(int i = 1 ; i <=n; i++){
  9. for(int j =1 ; j <=i ; j++){
  10. cout <<i;
  11. }
  12. cout << endl;
  13. }
  14.  
  15. for(int i = 65 ; i <= 64+n; i++){
  16. for(int j = 65; j <= i; j++){
  17. cout << char(i);
  18. }
  19. cout << endl;
  20. }
  21.  
  22. return 0;
  23. }
Success #stdin #stdout 0s 5324KB
stdin
5
stdout
1
22
333
4444
55555
A
BB
CCC
DDDD
EEEEE