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. char c='A';
  9. for(int i=0;i<n;i++) {
  10. for(int j=0;j<=i;j++) {
  11. cout<<c;
  12. cout<<" ";
  13. c++;
  14. }
  15. cout<<endl;
  16. }
  17. return 0;
  18. }
Success #stdin #stdout 0s 5316KB
stdin
5
stdout
A 
B C 
D E F 
G H I J 
K L M N O