Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Programming Questions: 8. Stadium Seating (9 points) There are three seating categories at a stadium. For a softball game, Class A seats cost $15, Class

image text in transcribed

image text in transcribed

image text in transcribed

Programming Questions: 8. Stadium Seating (9 points) There are three seating categories at a stadium. For a softball game, Class A seats cost $15, Class B seats cost $12, and Class C seats cost $9. Write a program that asks how many tickets for each class of seats were sold, then displays the amount of income generated from ticket sales. Format your dollar amount in fixed-point notation, with two decimal places of precision, and be sure the decimal point is always displayed. 9. Male and Female Percentages (9 points) Write a program that asks the user for the number of males and the number of females registered in a class. The program should display the percentage of males and females in the class. Hint: Suppose there are 8 males and 12 females in a class. There are 20 students in the class. The percentage of males can be calculated as 8 + 20-04, or 40%. The percentage of females can be calculated as 12 20-0.6, or 60%. 11. Interest Earned (9 points) Assuming there are no deposits other than the original investment, the balance in a savings account after one year may be calculated as Amount Principal *(1+Rate /T) Principal is the balance in the savings account, Rate is the interest rate, and T is the number of times the interest is compounded during a year (T is 4 if the interest is compounded quarterly). Write a program that asks for the principal, the interest rate, and the number of times the interest is compounded. It should display a report similar to Interest Rate: 4.25% Times Compounded: 12 Interest: Amount in Savings: S 1043.34 Principal: S 1000.00 S 43.34 Enter the principal amount: 5000 Enter the interest rate: 0.03 Enter the number of times interest will be compounded: 12 0 , 03% Interest Rate: Times Compounded: Principal: Interest: Amount in Savings: $ 5001.50 12 5000.00 $ 1.50 10. Currency (7 points) Write a program that will onvert U.S. dollar amounts to Japanese yen and to euros, storing the nd EUROS PER DOLLAR. To get exchange rate" n factors in the constants YEN PER DOLLARa the most up-to-date exchange rates, search the I If you cannot find the mo nternet using the term "currency st recent exchange rates, use the following: 1 Dollar 98.93 Yen 1 Dollar 0.74 Euros Format your currency amounts in fixed-point notation, with two decimal places of precision, and be sure the decimal point is always displayed Programming Questions: 8. Stadium Seating (9 points) There are three seating categories at a stadium. For a softball game, Class A seats cost $15, Class B seats cost $12, and Class C seats cost $9. Write a program that asks how many tickets for each class of seats were sold, then displays the amount of income generated from ticket sales. Format your dollar amount in fixed-point notation, with two decimal places of precision, and be sure the decimal point is always displayed. 9. Male and Female Percentages (9 points) Write a program that asks the user for the number of males and the number of females registered in a class. The program should display the percentage of males and females in the class. Hint: Suppose there are 8 males and 12 females in a class. There are 20 students in the class. The percentage of males can be calculated as 8 + 20-04, or 40%. The percentage of females can be calculated as 12 20-0.6, or 60%. 11. Interest Earned (9 points) Assuming there are no deposits other than the original investment, the balance in a savings account after one year may be calculated as Amount Principal *(1+Rate /T) Principal is the balance in the savings account, Rate is the interest rate, and T is the number of times the interest is compounded during a year (T is 4 if the interest is compounded quarterly). Write a program that asks for the principal, the interest rate, and the number of times the interest is compounded. It should display a report similar to Interest Rate: 4.25% Times Compounded: 12 Interest: Amount in Savings: S 1043.34 Principal: S 1000.00 S 43.34 Enter the principal amount: 5000 Enter the interest rate: 0.03 Enter the number of times interest will be compounded: 12 0 , 03% Interest Rate: Times Compounded: Principal: Interest: Amount in Savings: $ 5001.50 12 5000.00 $ 1.50 10. Currency (7 points) Write a program that will onvert U.S. dollar amounts to Japanese yen and to euros, storing the nd EUROS PER DOLLAR. To get exchange rate" n factors in the constants YEN PER DOLLARa the most up-to-date exchange rates, search the I If you cannot find the mo nternet using the term "currency st recent exchange rates, use the following: 1 Dollar 98.93 Yen 1 Dollar 0.74 Euros Format your currency amounts in fixed-point notation, with two decimal places of precision, and be sure the decimal point is always displayed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

The Accidental Data Scientist

Authors: Amy Affelt

1st Edition

1573877077, 9781573877077

More Books

Students also viewed these Databases questions