the employee's gross pay. 2. Theater Seating Revenue with Input Validation A dramatic theater has three seating sections, and it charges the following prices tor tickets in each section: section seats cost $20 each, section B seats cost $15 each, and section C seats cost $10 each. The theater has 300 seats in section A, 500 seats in section B, and 200 seats in section C. Design a program that asks for the number of tickets sold in each section and then displays the amount of income generated from ticket sales. The program should validate the numbers that are entered for each section.
Q: this is a problem that I have how would I go about solving it? Stadium Seating There are three…
A: Algorithm: Include required header files.Define main function.Initializes the seat prices for class…
Q: The boy scouts' popcorn supplies are all over the place and troops are only receiving certain…
A: Python used to answer this question
Q: A triangle is considered valid if the sum of each 2 sides is greater than the remaining third side.…
A: We have to write a program a program that takes the length of three sides and print "equilateral",…
Q: 1. Final Enrollment Fee by Jemar Jude Maranga Write a program that will take as inputs the…
A: The above question is solved in step 2 :-
Q: C++ One way to create a pseudo-random three digit number (and we are including one- and two-digit…
A: Code: #include <iostream>#include <cstdlib>#include <ctime>using namespace std;…
Q: User Prompts Your program will allow a human user to play Rock, Paper, Scissors with the computer.…
A: #Program import random def main(): print('ROCK'+'PAPER'+''+'SCISSORS'+''+'in Python') print()…
Q: My library > CMPSC 8: Introduction to Computer Science h. > = zyBooks 2.11: LAB: Computing driving…
A: PROGRAM CODE: # take the value of miles per gallonmil = float(input())# take the value of dollars…
Q: 5. The program snippet is known as follows: a = 10; b = 1; c = 2; do { b = b + 1…
A: Please make a code generator for the above program fragment. Following is the code generated in c++…
Q: A dramatic theater has three seating sections, and it charges the following prices for tickets in…
A: Total income= ticket sold in section A *20 + ticket sold in section B *15 + ticket sold in section C…
Q: Q1: Write a program that determines whether the input year is Leap or Simple, Where the leap year is…
A: //Program of leap year #include <stdio.h>int main() { int y; printf("Enter a year: ");…
Q: Ex: If the input of the program is: food.txt and the contents of food.txt are: Sandwiches Ham…
A: Code Screenshot :
Q: A supermarket is doing a sales promotion for soft drinks. If one day you buy soft drinks and bring…
A: Below is the code in C++ as language not specified and sample output:
Q: The factorial of 1 is written 1! and equals 1. Additionally, the factorial of 5 is written 5! and…
A: Please refer below for your reference: Language used is Python: def factorial(n): a=1; for i…
Q: Use this table to convert digits to barcode representation and vice-versa; each digit is represented…
A: we are going to convert the following zip code into bar code-
Q: Given the sample code above in generating a random number. Create a program that lets the user play…
A: Code: #include <iostream> using namespace std; int main(){ //declare variableint userChoice,…
Q: A dramatic theater has three seating sections, and it charges the following prices for tickets in…
A:
Q: Part E Question 1 Part E Question 2 Part E Question 3 Part E Question 4 Part E Question 5 Part E…
A: Since no programming language is mentioned, I am using c++ Algorithm: Start Initialize total to 0…
Q: Workers at a particular company have won a 7.6% pay increase. Moreover, the increase is retroactive…
A: C++programming: C++ is an object-oriented programming language that gives programs a simple…
Q: Q2: Write a program to compute and display a person's weekly salary as determined by the following…
A: Since no programming language is mentioned, I am using python. Algorithm: Start Read no.of hours n…
Q: 1. In this program you will produce an output of the total tax based on your income and marital…
A: In the below steps you can find the complete code in python. Since there is no language given in the…
Q: 2.12 LAB: Driving costs Driving is expensive. Write a program with a car's gas mileage…
A: LAB: Driving costs - functions Driving is expensive. Write a program with a car's miles/gallon and…
Q: A dramatic theater has three seating sections, and it charges the following prices for tickets in…
A: Pseudocode in c++: declare integer variables noOfticketsA,noOfticketsB,noOfticketsC,amount;…
Q: Suppose a new member of the city council has to be chosen from three candidates and suppose there…
A: Here is the approach :- As the approach is already provided in the quesiton itself . still it have…
Q: 9. Write a program that inputs two real numbers then exchanges their values. 10. Make a program that…
A: To write a program for the following to input two real numbers then exchange their values. to…
Q: The population of a town A is less than the population of town B. However, the population of town A…
A: while (popA < popB) { popA = (int)(popA * rateA + popA); popB = (int)(popB * rateB +…
Q: 4. Write a program that reads the subtotal and the gratuity rate, then computes the gratuity and…
A: the answer along with code and flowchart and output screenshot is given below
Q: Armstrong numbers between two intervals Write a program to print all the Armstrong numbers in the…
A: Find Your Code Below
Q: Q1) Write a program that takes as input any change expressed in Saudi Riyals. It should then compute…
A: //Note: Always the language of code in which you want the result. //For Now I am doing this in java…
Q: he population of a town A is less than the population of town B. However, the population of town A…
A: PROGRAM CODE: import java.util.*; public class Main{ public static void main(String[] args) {…
Q: Enter number of month M (1 January,..., 12 December): 6 Enter number of day D: 30 The zodiac sign is…
A: Here is the approach : Take input for the date and month Create the function to get the number of…
Q: program that will print countdown from 10 to 1 and will print HAPPY NEW YEAR after
A: Please find the answer below :
Q: Write a program that displays a salary schedule, in tabular format, for teachers in a school…
A: The below given C++ program will obey the following rubrics: Including necessary header files. In…
Q: A person is eligible to be a US senator if they are at least 30 years old and have been a US citizen…
A: PROGRAM EXPLANATION Take personage and years of citizenship as input from the user. Now, using the…
Q: 5.15 LAB: Output range with increment of 5 Write a program whose input is two integers. Output the…
A: According to the information given:- We have to create a program in that we take 2 integer value…
Q: pllowing inputs. A code representing the delivery area. A local delivery is code 1, and a long…
A: Below I implemented above problem in Python as per instructions/requirements, Comments are included,…
Q: A dramatic theater has three seating sections, and it charges the following prices for tickets in…
A: Pseudocode in c++: declare integer variables noOfticketsA,noOfticketsB,noOfticketsC,amount;…
Q: Given the sample code above in generating a random number. Create a program that lets the user play…
A: According to the information given:- We have to create rock paper and scissor game on the basic of…
Q: 1. Write a pyrhon program that prints out a classic hangman stick figure. The program should ask the…
A: Answer :
Q: decrease each of the next month’s bills by 10%. The city also levies a 3%utility tax, which is to…
A: Given: electricity cost per kilo watt is : 25.50Â utility tax is 3 % cost per kilo wat = 25.50 Â…
Q: The population of a town A is less than the population of town B. However, the population of town A…
A: Program description: n1 and n2 are the user input integer variables that store the populations of…
Q: 5. Some banks make debtors pay in round, yearly amounts. Make a program that would input a loaned…
A: Answer
Q: Take user input for a sentence (character by character) and count total number of vowels both…
A: Input character by character into a string till user moves to new line Compare each character and…
Q: A dramatic theater has three seating sections, and it charges the following prices for tickets in…
A: #include <iostream;using namespace std; int main(){ int…
Q: Armstrong numbers between two intervals Write a program to print all the Armstrong numbers in the…
A: A=int(input()) B=int(input()) flag = False for i in range(A, B+1): x = len(str(i)) sum1 =…
Q: Teachers in most school districts are paid on a schedule that provides a salary based on their…
A: I have provided solution in step2
Q: Given the sample code below in generating a random number. Create a program that lets the user play…
A: #include <iostream> #include <string> //to work with strings #include <cstdlib>…
Q: Ahmad and Salim went to a Hypermarket. Ahmad bought number (nl) of T-shirts, cach with a price (pl).…
A: Algorithm: Start Read n1,p1,n2,p2 Display n1*p1 Display n2*p2 Display n1*p1+n2*p2 Stop
Question 2
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 3 images
- 4. During each summer, John and Jessica grow vegetables in their backyard and buy seeds and fertilizer from a local nursery. The nursery carries different types of vegetable fertilizers in various bag sizes. When buying a particular fertilizer, they want to know the price of the fertilizer per pound and the cost of fertilizing per square foot. The following program prompts the user to enter the size of the fertilizer bag, in pounds, the cost of the bag, and the area, in square feet, that can be covered by the bag. The program should output the desired result. However, the program contains logic errors. Find and correct the logic errors so that the program works properly. // Logic errors. #include #include using namespace std; int main() { double costs double area; double bagsize; cout > bagsize; cout > cost; cout > area; cout << endl; cout << "The cost of the fertilizer per pound is: $" << bagsize / cost << endl; cout << "The cost of fertilizing per square foot is: $" << area / cost << endl; return 0; }Ron bought several acres of farm to grow and sell vegetables. Suppose that Ron wants to grow a maximum of two types of vegetables. Write a program that prompts Ron or the user to do the following: Enter the total farm area in acres. The number of vegetables (one or two) that the user wants to grow. If the user wants to grow trwo types of vegetables, then specify the portion,as a percentage, of the farm land used for each type of vegetable. Enter the seed cost, plantation cose, fertilizing cost, labor cost, for each acre. Enter vegetable selling price per acre. Output the total revenue. Output the profit/loss.(Rounding Numbers) Function floor can be used to round a number to a specific decimal place. The statementy = floor(x * 10 + 0.5) / 10;rounds x to the tenths position (the first position to the right of the decimal point). The statementy = floor(x * 100 + 0.5) / 100;rounds x to the hundredths position (the second position to the right of the decimal point). Write a program that defines fourfunctions to round a number x in various ways:A. roundToInteger(number)B. roundToTenths(number)C. roundToHundredths(number)D. roundToThousandths(number)For each value read, your program should print the original value, the number rounded to the nearest integer, the number rounded to the nearest tenth, the number rounded to the nearest hundredth and the number rounded to the nearest thousandth.
- C++ Programming Exercise: The population of town A is less than the population of town B. However, the population of town A is growing faster than the population of town B. Write a program that prompts the user to enter the population and growth rate of each town. The program outputs after how many years the population of town A will be greater than or equal to the population of town B and the populations of both the towns at that time. (A sample input is: Population of town A = 5,000, growth rate of town A = 4%, population of town B = 8,000, and growth rate of town B = 2%.)C++ Demonstration #1: Create a program segment that will ask for agrade from the user and display the strings “ Congratulations!” and “Youpassed.” if the grade is greater than or equal to 60, otherwise, theprogram displays “Sorry!” and “You failed”.program3_1.pyWrite a program that prompts the user to enter his/her age as an integer. The program should then respond by displaying the user's status based on the following age criteria:Age 55 and over: seniorAge 20 and over: adultAge 13 - 19: teenAge 12 and under: minor
- Description This lab assignment is loosely based on the End-of-Chapter Exercises Engineering P4.25. Review the instructions there for helpful information, such as the formula for radioactive decay. The example provided is Technetium-99 with a half-life of 6 hours. Your program should allow the user to enter the name of the radioisotope and the half-life (in hours). Write a program in c++ that will 1. a) Greet the user by name. Provide the user with a brief description of the program. 2. b) Invite the user to try the program. Allow user to choose. 3. c) Ask the user for the name of the radioisotope and the half-life (in hours). 4. d) Based on the given formula for radioactive decay in the text, print out a table of time and remaining relative level of radioactivity. (You may choose the increment for time. Provide an explanation of your choice.) At hour 0, the relative amount is 1.000. Ask the user for the length of time, in hours, since exposure. The table should have rows for as many…C++ Help The program reads in variables totalVolume and itemVolume from input. An item takes up itemVolume cubic inches, and the volume of a box is given by totalVolume cubic inches. Assign remainingVolume with the remaining volume after filling as many boxes as possible. Ex: If input is 13 4, the output is: Remaining volume: 1 Code available to fix: #include <iostream>using namespace std; int main() { int totalVolume; int itemVolume; int remainingVolume; cin >> totalVolume; cin >> itemVolume; /* Your code goes here */ cout << "Remaining volume: " << remainingVolume << endl; return 0;}(Financial application: compute future tuition)Suppose that the tuition for a university is $10,000 this year and increases 5% every year. Write a program that computes the tuition in ten years and the total cost of 4 years’ worth of tuition starting after the 10th year.
- C++ Angle Calculator Write a program that asks the user for an angle, entered in radians. The program should then display the sine, cosine, and tangent of the angle. (Use sin, cos, and tan library functions to determine these values.) The output should be displayed in fixed-point notation, rounded to four decimal places of precision.(Algebra: solve 2 * 2 linear equations) A linear equation can be solved using Cramer’s rule given in Programming Exercise 1.13. Write a program that prompts the user to enter a, b, c, d, e, and f and displays the result. If ad - bc is 0, report that “The equation has no solution.”Create a Visual Basic or VB.Net program that will compute the salary of employee. The HR staff is enable to enter the following: Number of days work. Rate per day. Compute the following: Gross Pay = total of salary without deduction (number of days work x rate per day) Total Deductions = (Benefits + tax) Net Pay = Total salary with deductions ( gross pay - total deductions) Total Deductions: SSS = 390.00 PAG-IBIG = 200 PHIL HEALTH = 350 Tax = 10% of Salary Sample output: Enter Number of Days Work: 10 Enter Rate per day: 537 [CALCULATE] [EXIT] [CLEAR SCREEN] Gross pay: 5370.00 Deductions SSS: 390 PAG-IBIG: 200 PHIL HEALTH: 350 TAX: 537 Total Deductions: 1477.00 Net Pay: 3893.00