fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. // your code goes here
  6. int s,i,n=5,j;
  7. char a='A';
  8. for(i=1;i<=n;i++){
  9. a='A';
  10. s=0;
  11. for(j=1;j<=i;j++){
  12.  
  13. a='A'+s;
  14. cout<<a;
  15. s++;
  16. }
  17. cout<<"\n";
  18. }
  19. return 0;
  20. }
Success #stdin #stdout 0.01s 5316KB
stdin
Standard input is empty
stdout
A
AB
ABC
ABCD
ABCDE