#include "iostream.h"
#include "graphics.h"
int main()
{
// Variable declaration
int cir, rec;
// Greet
cout << "Welome to the District Assessment!" << endl << endl;
cout << "How many circles do you want to display? [1-5] - ";
cin >> cir;
if (cir <= 0)
cout << "Error! You must enter 1 through 5. Run again." << endl;
elseif (cir <= 5)
{
cout << "How many rectangles do you want to display? [1-5] - ";
cin >> rec;
if (rec <= 0)
cout << "Error! You must enter 1 through 5. Run again." << endl;
elseif (rec <= 5)
initGraph();
else
cout << "Error! You must enter 1 through 5. Run again." << endl;
}
else
cout << "Error! You must enter 1 through 5. Run again." << endl;
return 0;
}
void renderScene ()
{
}
So for this program, I'm asking the user how many circles and rectangles does the user want to show in the graphics window. My problem is how am I going to do that? Can you put a loop statement in void renderScene and if you can how do you input it. I'm sorry but I'm kind of stressing out from this because this program counts as my final.
So, you wanna know how to actually get the circles and rectangles drawn on the command prompt? That would require a a for loop that loops through a sort of board. You can create an outline of the shape using math. Check where you want to create the border by telling the computer how to get there using subtraction, or addition. There are many examples of how to draw boards and circles online. That's what I'm assuming renderScene() is trying to do. Just output the shapes, using for loops.
If that isn't what you wanted, I'm sorry! I'm also starting out with programming! I could be dead wrong in my reply!