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