+ 1

i have a c++ exam tomrrow and i have a problem in loops :(

1st Nov 2016, 7:33 PM
mariam
9 Réponses
+ 1
for (int i=1;i<=5;i++){ for (int j=1;j<=5;j++){ if (i==1 || i== 5 || j==1 || j==5) { Draw anything } } }
3rd Nov 2016, 9:15 PM
Miguel Angel Sánchez Martínez
Miguel Angel Sánchez Martínez - avatar
0
i have to write a program that will take as input a postive integer between 3 and 5 included the program will draw a square of stars the body is empty
1st Nov 2016, 7:59 PM
mariam
0
thanks sir :)
1st Nov 2016, 8:07 PM
mariam
0
draw only when the value of variables be the first and last
3rd Nov 2016, 9:11 PM
Miguel Angel Sánchez Martínez
Miguel Angel Sánchez Martínez - avatar
0
sorry, to late
3rd Nov 2016, 9:16 PM
Miguel Angel Sánchez Martínez
Miguel Angel Sánchez Martínez - avatar
0
wow
5th Nov 2016, 11:32 PM
Gabor Rysula
Gabor Rysula - avatar
0
good
11th Nov 2016, 3:53 AM
Abdoo elnagar
0
****** ***** **** *** ** * what is the code for it
15th Nov 2016, 6:15 AM
Ali Farooq
- 1
for (int y=5; y>=1; y--){ for (int x=1; x<=x; x++){ write x } }
15th Nov 2016, 9:24 PM
Miguel Angel Sánchez Martínez
Miguel Angel Sánchez Martínez - avatar