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

  The user enter the total rainfall for each of 12 months

Write a program that lets the user enter the total rainfall for each of 12 months (starting with January) into an array of doubles. The program should calculate and display:the total rainfall for the year,the average monthly rainfall,and the months w..

  Write a loop that fills a vector

Write a loop that fills a vector V with ten  different  random numbers between 1 and 100. output must actually display the random numbers to get credit.

  Assume that section

Assume that section _1 seats are in front of the stage, and the price is expensive. say, each seat in the 1st three rows is $180.00, and each seat in the last two rows is 10% less;

  All the new strings generated

Explain why, if on some round, all the new strings generated for any syntactic category are longer than s, and s has not already been generated for L(), then s cannot ever be put in L(). Hint: Use Exercise 11.3.5.

  Problems on oops

Problems on OOPS

  Whitewater high school has contracted

Whitewater High School has contracted you to write a program that will read a file of student names and test scores in the formation FIRST NAME LAST NAME: SCORE1 SCORE2 SCORE3, where each of the scores is an integer

  The fibonacci sequence

In the novel "The DaVinci Code", a scrambled version 13, 3, 2, 21, 1, 1, 8, 5 of the first eight Fibonacci numbers appear as one of the clues left by murdered museum curator Jacques Sauniere. In this assignment, we will do something related to t..

  Add the correct code to fill the matrix array with the value

Use the file below code and add the correct code to fill the matr2 array with the values that make it the matrix transpose of matr1. There are many examples on the Internet that show how to do this in C++ and what it should look like when it is corre..

  Use the getint and getintwithinrange methods

Use the getInt and getIntWithinRange methods to validate that each score ranges from 1 through 100 and add code that discards any extra entries at the prompt that asks if you want to enter another score to the application below.

  Design a nested program

How many levels of nesting are there in this design?

  Project

Unit 3 Individual Project SSCI210 – 1304B – 01 A typical individual who commits who commits hate crimes whether it is against or aimed at the Gay/lesbian community , the persons of color or the Jewish community, ( I mention these three because they a..

  Write a method named negative sum

Write a method named negativeSum that accepts a Scanner as a parameter reading input from a file containing a series of integers, and determine whether the sum starting from the first number is ever negative

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