fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. // your code goes here
  6. int n ; cin>>n;
  7.  
  8. for(int i =0;i<n;i++){
  9. for(int j=0;j<=i;j++ ){
  10. cout<<char(64+n+j-i);
  11. }
  12. cout<<endl;
  13. }
  14. return 0;
  15. }
Success #stdin #stdout 0.01s 5288KB
stdin
8
stdout
H
GH
FGH
EFGH
DEFGH
CDEFGH
BCDEFGH
ABCDEFGH