Code should include a loop that displays income

Assignment Help C/C++ Programming
Reference no: EM13165295

This code should include a loop that displays income generated from ticket sales for each night. Shows are performed on Thursday, Friday and Saturday nights.

int main()
{
int A, B, C;
int TotalIncome;

cout << "Enter number of seats sold in Section A: \n";
cin >> A;

cout << "Enter number of seats sold in Section B: \n";
cin >> B;

cout << "Enter a number of seats sold in Section C: \n";
cin >> C;

while (A < 0 or A > 300)
{
cout << "ERROR: Seats sold in Section A cannot be \n";
cout << "greater than 300 or negative.\n ";

cout << "Enter valid value for seats sold in section A: \n";
cout << "A value in the range of 0 to 300 inclusive. \n";
cin >> A;
}
while (B < 0 or B > 500)
{
cout << "ERROR: Seats sold in Section B cannot be \n";
cout << "greater than 500 or negative.\n ";

cout << "Enter valid value for seats sold in section C: \n";
cout << "A value in the range of 0 to 500 inclusive. \n";
cin >> B;
}
while (C < 0 or C > 200)
{
cout << "ERROR: Seats sold in Section C cannot be \n";
cout << "greater than 200 or negative.\n ";

cout << "Enter valid value for seats sold in section C: \n";
cout << "A value in the range of 0 to 200 inclusive. \n";
cin >> C;
}
TotalIncome = (A * 20) + (B * 15) + (C * 10);

cout << "The total income generated from ticket sales \n ";
cout << "of all sections is $ " << TotalIncome;

}

Reference no: EM13165295

Questions Cloud

Ticketmaster : TICKETMASTER - this class will have: a service charge = $8.00 per ticket, tax = .085 current amount of all tickets sold. Its responsibilities are printing a list of events for sale, looking up an event for a customer, and selling a ticket to the e..
Binary scientific notation : For IEEE 754 single precision floating point, what is the number, as written in binary scientific notation, whose hexadecimal representation is: 0061 0000
America and the great war : The assassination of Archduke Franz Ferdinand was the immediate cause of World War I. But the events that led to the Great War go further back into the nineteenth century. As with the Boxer Rebellion of 1900, nationalism, imperialism, and militarism ..
Write the hexadecimal representation for -1.0 : For IEEE 754 single precision floating point, write the hexadecimal representation for -1.0
Code should include a loop that displays income : This code should include a loop that displays income generated from ticket sales for each night. Shows are performed on Thursday, Friday and Saturday nights.
Implements both the quicksort and mergesort algorithms : Write a program that correctly implements both the Quicksort and Mergesort algorithms. The program should generate an array of 500 random numbers in the 1-100 range. The program should sort the same set of numbers and keep time stamps of how long it ..
How to link different classes forms : How to link different classes forms. When a person clicks on A, B, or C the program will go to the addEmployee form or Punch In/Out form in Java.
While loop that allows the user to continue entering : This code should include a while loop that allows the user to continue entering employees as long as they want to continue:int main(){Real payrate,hours, gross,again;
E easy to process in a cobol variable-length record : Which would be easy to process in a COBOL variable-length record or fixed-length record?

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Implement a class to represent a matrix

Implement a class to represent a matrix. While doing this exercise, you are allowed only to use C++ primitive types and arrays. You may not use STL in your Matrix definition. You must use dynamic memory.

  Write an input validation loop

write an input validation loop that asks the user to enter a number in the range of 1 through 4.

  Write an application that creates a quiz

Write an application that creates a quiz, which contains at least 5 questions about a hobby, popular music, astronomy, or any other personal interest. Each question can be multiple choice(a,b,c,d should be user accepted response), or true or false(t ..

  Use a for loop to generate 100 random numbers.

Use a For Loop to generate 100 random numbers. Determine the most current maximum and minimum number as the random numbers are being generated. This is referred tp as a "running" maximum and minimum. Display the running maximum and minimum values as ..

  Write c program to read one ip address

Write a C or C++ program which Read one IP address at a time from Dec_IPAddresses.txt and convert it into Hex. Store converted values stored in another file (e.g. HEX_IPAddresses.txt).

  20 integers saved in a file called "data.txt"

There are 20 integers saved in a file called "data.txt" (just a random txt file with some numbers) All integers are in the range from 1 to 10

  Programming assignment is to tweak the existing mammal

programming assignment is to tweak the existing Mammal program and create your own Vehicle program.

  Create a class named gamer that has a field for name

Create a class named Gamer that has a field for name(string) and a field for points(int).

  Program to check compatibity for matrix multiplication

Write down program in C++ for matrix multiplication. Program must accept dimension of both matrices to be multiplied and check for compatibity.

  After the array is created and loaded

After the array is created and loaded, the problem is then to sort the array and print out the contents of the sorted array. Please use a separate function for the sort routine and also a separate function for the print out of the array.

  Program to compute gross wages for employee using array

Write program which uses the following arrays: payRate: array of seven floats to hold each employee's hourly pay rate. wages: array of seven floats to hold each employee's gross wages.

  Write a bouncing ball video game

The balls bounces within the screen where the two horizontal walls are fixed

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd