+ 4
#include <iostream> using namespace std; int main() { char c = 65; //Start_with A. int i=0; for(;i<5;i++) { for(int j=0;j<i;j++) { cout<<c; c++; } cout<<endl; } i-=2; for(;i>0;i--) { for(int j=0;j<i;j++) { cout<<c; c++; } cout<<endl; } return 0; } Ill upload a general case for some user input n as well soon.
6th Oct 2017, 5:17 PM
Solo Wanderer 4315
Solo Wanderer 4315 - avatar