okay so I have to write this nested loop so that it outputs a V, i am having a hard time getting the rest of this v. I only can get the \ part of it, but cannot get the / part can anyone give me some insight on what i am doing wrong..
The code is:
#include <iostream>
using namespace std;
int main()
{
int size = 0;
while (size < 1 || size > 10)
{
cout << "please enter a number from 1-10: ";
cin >> size;
}
for (int row = 1; row <= size*2-1; row++)
{
for (int col = 1; col <= size; col++)
{
if (row == col || col == size*2-1)
cout << "*";
else
cout << " ";
}
cout << "\n";
}
system("pause");