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>
usingnamespace 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!
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.