+ 1

Using nested loop....

& & & & & & & & & & & & & & & &

14th Oct 2016, 5:04 PM
SAMBHAV KUMAR THAKUR
SAMBHAV KUMAR THAKUR - avatar
1 ответ
+ 6
#include <iostream> #include <iomanip> using namespace std; int main() { int i = 1; int j = 7; int k = 0; for (i = 1; i <= 4; i++) { cout << setw(9 - j); for (k = 0; k < j; k++) { cout << "& "; } j -= 2; cout << endl; } return 0; }
16th Jan 2017, 9:05 AM
Hatsy Rei
Hatsy Rei - avatar