int main()
{
//variables
int jan = 0;
int feb = 0;
int mar = 0;
int MAX_POSSIBLE_SALES = 10000;
int monthly_sales = 0;
int height = 0;
int height1 = 0;
int height2 = 0;
int total = 0;
int average = 0;
int obj_no = 0;
//Display graphics
displayGraphics();
//prompt the user to input
cout << "Enter January Sales: ";
cin >> jan;
cout << "Enter February Sales: ";
cin >> feb;
cout << "Enter March Sales: ";
cin >> mar;
//drawing the lines of the chart
drawLine (200, 50, 200, 250, 1);
drawLine (200, 250, 400, 250, 1);
//drawing the lines of the summary box
//placing everything in the summary box
gout << setPos (205, 315) << "Summary" << endg;
total = (jan+feb+mar); //equation total sales
average = (total/3); //equation average sales
gout << setPos (205, 330) << "Total Sales: $" << total << endg;
gout << setPos (205, 345) << "Average Sales: $" << average << endg;
//equations for the height of the bars
height = (jan/MAX_POSSIBLE_SALES);
height1 = (feb/MAX_POSSIBLE_SALES)*100.0;
height2 = (mar/MAX_POSSIBLE_SALES)*100.0;
NOW EVERYTHING IS WORKING PERFECT BUT THE BARS THEY SHOULD HAVE THE HEIGHT OF THE EQUATION AND BE DRAWN DEPENDING OF THE INPUT BUT IT IS NOT DOING ANYTHING IT IS ALWAYS 0 WHAT AM I DOING WRONG?
We don't know anything about drawRect. When I look at it, though, it appears (though I may be wrong) that it takes an x coordinate and a y coordinate. So, to me, it would make sense if you added the first y coordinate to the heights (250) before plugging the heights into your drawRect().