I am required to output Hi in huge block letter which is enclosed in a box of * in C++. image of the output required So far Ive only managed to figure out a basic way where I print each line by line, but is there any smarter way to do it?
Heres what I managed so far
#include <iostream>
using namespace std;
int main(){
cout << "**********************" << endl;
cout << "* *" << endl;
cout << "* HH HH II *" << endl;
cout << "* HH HH II *" << endl;
cout << "* HH HH II *" << endl;
cout << "* HH HH II *" << endl;
cout << "* HHHHHHHH II *" << endl;
cout << "* HH HH II *" << endl;
cout << "* HH HH II *" << endl;
cout << "* HH HH II *" << endl;
cout << "* HH HH II *" << endl;
cout << "* *" << endl;
cout << "**********************" << endl;
return 0;
}
Aucun commentaire:
Enregistrer un commentaire