+ 1

Write a program to print the following pattern!!!!!

***** * * * * *****

26th Mar 2017, 4:17 PM
abhijit kushwaha
abhijit kushwaha - avatar
1 Antwort
+ 4
int main() { const unsigned int RECT_W = 5; const unsigned int RECT_H = 4; for (int i = 0; i < RECT_H; i++) { for (int j = 0; j < RECT_W; j++) { if ((i > 0 && i < RECT_H - 1) && (j > 0 && j < RECT_W - 1)) { cout << " "; } else { cout << "*"; } } cout << endl; } return 0; }
26th Mar 2017, 4:37 PM
Zeke Williams
Zeke Williams - avatar