Window C++ application homework help

Hi all,

im a total noob having to take C++ as part of my design course please help me!

Win Application using visual studios add item C++
Start with this code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include <iostream> 
using namespace std; 
int main() 
{ 
int x = 5; 
for ( int r = 0; r < x; r++ ) 
{ 
for ( int c = 0; c < x; c++ ) 
{ 
if ( c == 0 || c == x - 1 || r == 0 || r == x - 1) 
cout << "*"; 
else 
cout << " "; 
}// inner for 
cout << endl; 
}// outer for 
} 


(b) Using while loop, modify the program in Table 1.

(c) You noted that the value of x is hard-coded and the program in Table 1 executes only once. Amend the program in Part (b) to allow data entry for the variable x and repeats the execution until the user enters the sentinel value, -1 to exit the program. Comment your code for this Part (c).

Please help me with the code guys i would really appreciate it thanks!
Last edited on
What have you got so far?
i had to be honest my friend, i know nothing about c++ and my lecturer is teaching like a speed train.. im kinda doomed
He means what code have you done so far for the assignment. Doing the assignment for you will not help you but instead hurt you. We can how ever help with the things you are having a difficult time with.
Topic archived. No new replies allowed.