A movie in a local theater is in great demand. To help a local charity, the theater owner has decided to donate a portion of the gross amount generated from the movie to the charity. This example designs and implements a program that prompts the user to input the movie name, adult ticket price, child ticket price, number of adult tickets sold, number of child tickets sold, and percentage of the gross amount to be donated to the charity. The output of the program is as follows: ** The input to the program consists of the movie name, adult ticket price, child ticket price, number of adult tickets sold, number of child tickets sold and percentage of the gross amount to be donated to the charity. Sample Input: Enter the movie name : Darna Enter the price of an adult ticket: 4.50 Enter the price of a child ticket : 3.00 Enter the number of adult tickets sold : 800 Enter the number of child tickets sold : 1850 Enter the percentage of donation : 10 Sample Output: Movie Name : Darna Number of ticket sold : 2650 Gross amount : 9150.00 Amount donated : 915.00 Net Sale : 8235.0
Max Function
Statistical function is of many categories. One of them is a MAX function. The MAX function returns the largest value from the list of arguments passed to it. MAX function always ignores the empty cells when performing the calculation.
Power Function
A power function is a type of single-term function. Its definition states that it is a variable containing a base value raised to a constant value acting as an exponent. This variable may also have a coefficient. For instance, the area of a circle can be given as:
A movie in a local theater is in great demand. To help a local
charity, the theater owner has decided to donate a portion of the gross amount generated from the movie to the charity. This example designs and implements a
** The input to the program consists of the movie name, adult ticket price, child ticket price, number of adult tickets sold, number of child tickets sold and percentage of the gross amount to be donated to the charity. Sample Input:
Enter the movie name : Darna Enter the price of an adult ticket: 4.50 Enter the price of a child ticket : 3.00 Enter the number of adult tickets sold : 800 Enter the number of child tickets sold : 1850 Enter the percentage of donation : 10
Sample Output: Movie Name : Darna Number of ticket sold : 2650 Gross amount : 9150.00 Amount donated : 915.00 Net Sale : 8235.00
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images