Can someone help with my C++ program??!!!

Feb 18, 2013 at 4:52am
I need a program to calculate the total revenue.
I need help
here is my c++ program:

//Program to calculate total revenue
#include <iostream>
using namespace std;
int main()
{
//Declare variables
double Orchestra = 25.0;
double Mainfloor = 30.0;
double Balcony = 15.0;
int NumberofseatsinOrchestra = 0 ;
int NumberofseatsinMainFloor = 0;
int NumberofseatsinBalcony = 0;

//Enter Input Items
cout << “Enter Orchestra:”;
cin >> Orchestra;
cout << “Enter MainFloor:”;
cin >> Mainfloor;
cout << “Enter Balcony:”;
cin >> Orchestra;
cout << “Enter Number of seats in Orchestra:”;
cin >> NumberofseatsinOrchestra;
cout << “Enter Number of seats in MainFloor:”;
cin >> NumberofseatsinMainFloor;
cout << “Enter Number of seats in Balcony:”;
cin >> NumberofseatsinBalcony;


//Calculate total number of revenue in Orchestra
totalNumberofRevenueinOrchestra = NumberofseatsinOrchestra* Orchestra

totalNumberofRevenueinMainFloor = NumberofseatsinMainFloor* MainFloor

totalNumberofRevenueinBalcony = NumberofseatsinBalcony* Balcony

totalNumberofRevenue = totalNumberofRevenueinMainfloor+
totalNumberofRevenueinOrchestra+
totalNumberofRevenueinBalcony

cout << “Display Total Revenue” << endl;
//end to take the cursor to the return 0;
Feb 18, 2013 at 5:21am
what is your problem? and please use code tag can?
hard to see and lazy =.=
Feb 18, 2013 at 6:03am
you forgot a closing bracket?
Feb 18, 2013 at 10:30pm
don't the "totalMumberof ... " variable need to be delcared somewhere ?
missing semicolons at the end too ?
Last edited on Feb 18, 2013 at 10:31pm
Feb 18, 2013 at 11:09pm
missing semicolons at the end too ?

Missing a whole lot of them...

But also, you don't have a line to display the results...
Unless you intended to have it on the same line as: cout << “Display Total Revenue” << endl; in which case you need to add the variable to that line.

I would also suggest using \n at the beginning of most lines. Otherwise, once you run this, the text will all mash itself into one sentence.
Last edited on Feb 18, 2013 at 11:11pm
Topic archived. No new replies allowed.