Write a program that reads from the user the product unit price, tax percentage to be applied on the product, and number of items bought. The program should calculate and print the total price to be paid by the user. Total I price = (unit price + unit price X tax / 100) X number of items The below Sample Run is to calculate the total payment of a product price 10$, tax is 5%, and number of items bought is 7: Sample Run: Please enter the unit price, tax percentage, and the number of items: 10 5 7 The total price is: $73.5
Q: Write a program which prompts the user for their age. If they are 19 or younger inform them that…
A: "Since you have not mention any programming language, so we will write this program in C++…
Q: Given an airplane’s acceleration a and take-offspeed v, you can compute the minimum runway length…
A: Program code: //Importing utility for inputimport java.util.Scanner;//define a class…
Q: Write a program that takes the distance of the commute in kilometers, the car fuel consumption rate…
A: function main: Start declare kms, fuel, petrol read kms read fuel read petrol cost_of_commune =…
Q: Write a program that reads integers between 1 and 100 and counts the occurrences of each. Assume the…
A: The question is to write the code for the given problem. As here no language has been mentioned Java…
Q: Write a program that prompts the user to enter two integer numbers x and y. The program must check…
A: Since , their is no any specific language is mentioned for writing a program so program is written…
Q: Write a program for The Carefree Resort named ResortPrices that prompts the user to enter the number…
A: C# is a general purpose multi-paradigm programming language developed and used by Microsoft. It…
Q: 2.Write a program that allows the user to enter the names of five candidates in a local election and…
A: Since no programming language is mentioned, I am attempting this in python. If you need it in any…
Q: Write a program that prompts the user to enter the year and thefirst three letters of a month name…
A: Since, here no programming language is specified. So, we are providing the solution in Java. The…
Q: Write a program that reads the subtotal and the gratuity rate, then computes the gratuity and total.…
A: Here I have asked the user to enter subtotal and gratuity rates. Then I have calculated the gratuity…
Q: Write a program that asks the user to enter 2 integers of 4 digits and displays the different digits…
A: Algorithm: Start Read 2 4 digit numbers Convert numbers to string s1,s2 Declare an empty string…
Q: Write a program that reads any 5 numbers as in the given sample of output below: Sample of…
A: Required: Write a program that reads any 5 numbers as in the given sample of output below:
Q: Write a program that allows the user to enter the last names of a number of candidates in a local…
A: There is no programming language mentioned, so i have used C++ for program. Please check the step…
Q: Write a program that reads two integers (M and N) from user until user provide 0 for M and N. The…
A: Code: n = int(input("Enter the value of n : ")) m =…
Q: Use C language in this program
A: Here I have created a function named gcd(). Inside the function, I have created the condition to…
Q: You are asked to write a program that calculates your electric bill. You are to input the number of…
A: Since no programming language is mentioned, I am using python. Algorithm: Start Read kilowatt hours…
Q: Write a program that allows the user to enter the last names of five candidates in a local election…
A: You need to input the last names of five candidates in a local election and the number of votes…
Q: Write a program that keeps prompting the user to enter the first character of his favorite car; and…
A: The user enters the first alphabet of the car and his/her car’s name get displayed.
Q: Write a program that reads from the user the registration fees, number of credits required for a…
A: Given: To write a program to calculate the payment to be paid by user each year and satisfying the…
Q: Write a program that asks the user to enter his/her name and then reads integers, finds the largest…
A: Provided the Java Program with the requirements as given in the question. Added the appropriate…
Q: Write a program that computes the employee's payroll of ABC Company. The user is first asked to…
A: Formula to calculate the gross income of an employee Gross Income =Hourly Rate * Number of Hours…
Q: Write a program that prompt the user to enter 2 items, if the user purchases bread and butter he…
A: Solution: Java program: import java.util.*; public class Test { // Main method public…
Q: Write a program that prompts the user to enter the annual income (in int) of an employee. The…
A: 1)Start 2)read the income from the user 3)Based on the amount using if statement decide the slab of…
Q: In this program you will ask the user for 4 integers that represent two fractions. First ask for the…
A: function main: Start Declare a, b, c, d, sum Display "What is the numerator of the first fraction?…
Q: Your relative, who goes to primary school and has just learned the multiplication table, asks you to…
A: using System; public class Multiplication { public static void main() { int i,n,count=0;…
Q: Write a program that reads from the user the registration fees, number of credits required for a…
A: Given: To write a Java program that reads from the user the registration fees and other requirements…
Q: Write an improved version of the futval.py program from Chapter 2. Your program will prompt the user…
A: Please refer below for your reference of code and output screenshot: print("Enter the investment…
Q: Write a program that reads in loan amount, annual interest rate and number of years for the loan and…
A: Actually, program is an executable software that runs on a computer.
Q: Write a program that prompts the user to enter the amount of cash, then your program should…
A: Start Print the name. Ask the user to enter the amount the cash. Find the zakat using formula. Print…
Q: Write a program that reads from the user 7 lines of input. Each line includes a team's name (String)…
A: The below given C++ program will obey the following rubrics: Including necessary header files. In…
Q: In this program you will ask the user for 4 integers that represent two fractions. First ask for the…
A: In this program, the user is asked for 4 integers that represent two fractions. First ask for the…
Q: Write a program in Python that reads the following information and prints a payroll statement:…
A: answer : import java.util.scanner; public class employeepayroll { public static void main(string[]…
Q: In Coral Programing!! Write a program that takes in an integer in the range 20-98 as input. The…
A: Read an integer as input. Check if the integer is between “20” and “98”. If yes, move on to next…
Q: You are to write a simple program that asks the user for input, processes theinput, and then outputs…
A: Answer :
Q: Please write a program which asks for the hourly wage, hours worked, and the day of the week. The…
A: - We have to correct the code for wage in python.
Q: Write a program that reads an integer between 1972 and 2001 (year of birth). Print the age group…
A: #include<iostream>using namespace std;int main(){ int x; cout<<"Enter the year of birth…
Q: Write a program that computes the fuel efficiency of a multi-leg journey. The program will first…
A: Python code :- def question9(): print("Question 9) # arrays to store miles and gas used…
Q: Write a program that prompts the user to enter the name, the number of children, an i the basic…
A: According to the asked question, the solution is given below with a proper explanation.
Q: Write a program that does temperature converter", "- The user will enter if he wants the result in…
A: The following are steps needs to be taken for the given program: Asking user the temperature as…
Q: Write a program that asks the user to enter the number of employee's and depending on this number he…
A: Sample Response: //JAVA programimport java.util.*;//Declare a Class Employeeclass Employee{…
Q: Write a program that prompts the user to enter an integer (n) and a sum value (s). The program…
A: PROGRAM CODE: import java.util.*; // import java utility packagepublic class…
Q: Write a program that inputs the hourly rate and number of hours worked. Compute and display the…
A: Here I have taken input from the user and then stored it into 2 different variables. Next, I have…
Q: Write a program that helps a company manage salaries of its employees. Your program should ask for…
A: Programs: Programs are used to interact with the computer system. It is used to solve complex…
Q: Write a program that invites the user to enter two numbers: a dividend (the top number in a…
A: According to the Question below the Solution: Output:
Q: Write a simple payroll program that will display the employee's information, The program should…
A: Question given: Write a Java program that display employee's payroll information. Ask from user…
Q: Write a program that prompts the user to enter the annual income (in int) of an employee. The…
A: create variables for tax and income use for loops for the given percentage of taxes that are payable…
Q: rite a program that reads the subtotal and the gratuity rate, then computes the gratuity and total.…
A: Approach:- first read subtotal and GratuityRate Calculating Gratuity :- Gratuity = (subtotal *…
Q: We want to compute a taxi travel price. Write a program that asks the user to enter: The travel…
A: Given: To write java program according to the given conditions for calculating the taxi travel…
Q: Write a program that prompts the user to enter the name, the number of children, and the basic…
A: Please give positive ratings for my effort. Thanks. PROGRAM #include<bits/stdc++.h>using…
Q: 12. Write an improved version of the futval.py program from Chapter 2. Your program will prompt the…
A: CODE:- 1. Call the main() function. 2. Display the result in the tabular format. 3. Print the…
Q: C# Write a program for The Carefree Resort named ResortPrices that prompts the user to enter the…
A: Algorithm: Start Read enter the number of days for a resort stay n If n==1 or n==2,calculate cost…
write the
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 2 images
- Write a program that converts square meter into ping.The program prompts the user to enter a number in square meter, converts it to ping,and displays the result. One square meter is 0.3025 ping.Here is a sample run: Enter a number in square meters: 5050.0 square meters is 15.125 pingsWrite a program that calculates and prints the total bill at a restaurant. Prompt the user for the cost of the meal and then ask if a tip will be added. If it is, prompt for the tip percent as an integer. Of course, the tip percent should not be requested if no tip will be added. Finish by printing the meal cost, tip amount, and total bill. Sample OutputEnter total cost of the meal 80Are you adding a tip? y/n yEnter the tip percent as an integer 25Here is your bill.Meal cost $80.00Tip $20.00Total cost $100.00Write a program that takes a positive integer x greater than zero typed in by the user, and prints the count from x to x+9 (including this one) using printf with newline after each printed value. Example: if x=1, the program should print:
- Write a program that prompts the user to enter theminutes (e.g., 1 billion), and displays the number of years and remaining days forthe minutes. For simplicity, assume that a year has 365 days. Here is a sample run: Enter the number of minutes: 10000000001000000000 minutes is approximately 1902 years and 214 daysWrite a program that prompts the user to enter an integer from 1 to 7 and displays a pyramid, as presented in the following sample run ---Write a program that requests the user to enter the total purchase in dollars and cents ( for example, $23.65, $45.00, etc) and outputs the discount in dollars and cents. If the total purchase is less than 200 dollars, there is no discount. If the total purchase is more than 200 dollars but less than or equal to 1000 dollars, then the discount is 15%, and if the total purchase is more than 1000 dollars, then the discount is 30%. At this store, a student always gets 30% discount on all purchases. Include this information in your codes.
- Write a program that prompts the user to enter an integer from 1 to 15 and displays a pyramid, as shown in the following sample run:Write a program that prompts the user to enter the year and thefirst three letters of a month name (with the first letter in uppercase) and displaysthe number of days in the month. If the input for month is incorrect, display a messageas presented in the following sample runs: Enter a year: 2001 ↵EnterEnter a month: Jan↵EnterJan 2001 has 31 daysWrite a program that allows the user to enter the last names of five candidates in a local election and the number of votes received by each candidate. The program should then output each candidate’s name, the number of votes received, and the percentage of the total votes received by the candidate. Your program should also output the winner of the election. A sample output is: Candidate Votes Received % of Total Votes Johnson 5000 25.91 Miller 4000 20.73 Duffy 6000 31.09 Robinson 2500 12.95 Ashtony 1800 9.33 Total 19300 The Winner of the Election is Duffy
- You are asked to write a program that calculates your electric bill. You are to input the numberof kilo-watt hours (kWh) used in a 31 day billing period. Electricity costs 6.72 cents per kWh; atax of 8% should be added. Write a program that accepts the number of kilo-watt hours usedand prints a bill.Sample Run:Please enter the kilo watt hours over 31 days: 412Electric bill for a 31 days period is as follows:Number of Kilo Watt hours: 412.0Amount: $27.6864 Tax: $2.214912Total: $29.901311999999997Write a program that calculates the change due a customer by denomination; that is, how many pennies, nickels, dimes, etc. are needed in change. The input is to be the purchase price and the size of the bill tendered by the customer ($100, $50, $20, $10, $5, $1)Write a program that takes in an integer in the range 11-100 as input. The output is a countdown starting from the integer, and stopping when both output digits are identical. Additionally, output the distance between the starting and ending numbers (ex: 93 - 88 = 5) Note: End with a newline. Ex: If the input is: 93 the output is: 93 92 91 90 89 88 5 Ex: If the input is: 11 the output is: 11 0 Ex: If the input is: 9 or any value not between 11 and 100 (inclusive), the output is: Input must be 11-100 For coding simplicity, follow each output number by a space, even the last one. Use a while loop. Compare the digits; do not write a large if-else for all possible same-digit numbers (11, 22, 33, …, 99), as that approach would be cumbersome for larger ranges. Hint: To practice incremental development, start by writing code that just outputs the countdown until matching digits and submit to get most of the points. Then, update your code to output the distance.