Write a program that prompts the user to enter the total time in seconds and displays the hours, minutes and seconds for the total time. Declare two constant integers named SCND_ TO_HOUR initialized to 3600 and SCND TO MINUTE initialized to 60. For example, 5000 seconds are equal to 1 hour, 23 minutes and 20 seconds. Here is a sample run: Input the total time in seconds : 5000 5000 seconds are equal to 1 hours, 23 minutes and 20 seconds.
Q: Write a program that computes the molecular weight of a carbohydrate (ingrams per mole) based on the…
A: Given: Write a program that computes the molecular weight of a carbohydrate (ingrams per mole) based…
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: Write a program that generates a random number in the range of 1 through 100, and asks the user to…
A: ## As no language is mentioned here, we write the program in Python language. # importing…
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 asks the user to enter a number of seconds. Solving the Time Calculator Problem…
A: sec=int(input("Enter number of seconds: ")) if sec<3600 and sec>=60 : print(f"Number of…
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 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 gives simple math quizzes. The program should display two randomnumbers that…
A: CODE:- import randomdef main(): #Program message print(" Math Quiz" )print("Enter the result of…
Q: Write a program that asks the user to enter the coordinates of 4 points that draw two different…
A: 1)Take input of coordinates for two lines into list 2) calculate slope of two lines 3) based on…
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 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: Write a program that asks the user to type in a time in seconds and display it in the standard…
A: Program code: //include the required header files #include<stdio.h> //define main functions…
Q: Write a program that prompts the user to enter an integer fortoday’s day of the week (Sunday is 0,…
A: Purpose of the program: This program would create an application that receives today's day and the…
Q: Write a program that allows a user to enter any number of student quiz scores, as integers, until…
A: Since you haven't mentioned the programming language, we are answering this question in C++. Program…
Q: Write a program that prompts the user to input three (3) integers: MM, DD, and YYYY. For example, 07…
A: Introduction: Here we are required to create a program that tells us the difference between the 1st…
Q: Write a program that prompts the user to enter an integer number and determines whether it is…
A: Take input from user using Scanner class of java Create 3 if else block Check if number is divisible…
Q: Write a program that simulates the proverbial game of Russian Roulette. The program will prompt the…
A: Given: Write a program that simulates the proverbial game of Russian Roulette. Theprogram will…
Q: Write a program that asks the user for two positive integers between 2 and 10 to use for the length…
A: Code #include <iostream> using namespace std; int main() { int a,b; cout<<"enter two…
Q: Write a program that will take as input the type of restaurant the user ate at, the cost of the…
A: Use if else if conditions to check each type and add tax in every case
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 prompts the user to enter the numerator and denominator of a fraction. The…
A: import java.util.*; public class fractioncheck {public static void main(String args[]) { Scanner…
Q: Write a program that prompts the user for a U.S. dollar amount and then converts it to Japanese Yen,…
A: Purpose: In this the dollar has to be converted into yen, Pound, Currency and then it has to…
Q: Write a program that prompts the user to enter an integer number and determines whether it is…
A: Given :
Q: Write a program that asks the user to type in a time in seconds and display it in the standard…
A: sec = int(input('Time in seconds: '))if(sec>60): min = int(sec/60) sec = sec%60if(min…
Q: Write a program that simulates the proverbial game of Russian Roulette. The program will prompt the…
A: first, take the input for the bad number and the number of players in the game then loop over these…
Q: Write a program that asks the user to enter 10 numbers, that range from 0-100. Make sure that you do…
A: I give the code in C# along with output and code screenshot
Q: Write a program that simulates the proverbial game of Russian Roulette. The program will prompt the…
A: Code: #include <iostream>#include <cstdlib>#include <ctime>#define MAX 50using…
Q: BMI Calculation
A: Program: // C++ Version 14#include <iostream>#include <cmath>using namespace std;//…
Q: Write a program that converts square meter into ping. The program prompts the user to enter a number…
A: Java program to convert square meters into ping Given: one square meter =0.3025 ping Approach: -…
Q: Write a program that lets the user guess whether a randomly generated integer would be even or odd.…
A: #include <stdio.h> /* printf, scanf, puts, NULL */ #include <stdlib.h> /*…
Q: Write a program that prompts the user to enter the number of students and each student's name and…
A: Python code to copy:- n = int(input("Enter the number of students: "))name1 = input("Enter a student…
Q: Write a program that reads a positive integer x from the user. If x is even, the program prints all…
A: logic:- declare x do { read positive number if x<0 display error message } while (x<0); if…
Q: Write a program that prompts the user to enter 10 integers, and normalizes the integers to be in the…
A: we get- 10 user-inputted integers. we have to normalize the numbers by dividing each number by the…
Q: Write a program that prompts the user to enter the year and first day of the year, then displays the…
A: Given, we get- year from the user, first day of the year from user. based on the above data, we…
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: Write a program that prompts the user to enter the exchange rate from currency in U.S. dollars to…
A: Write a program that prompts the user to enter the exchange rate from currency in U.S. dollars to…
Q: Write a program that prompts the user to input the three coefficients a, b, and c of a quadratic…
A: Sample Response: #Python program to find the roots of quadratic equationimport math# function to…
Q: Write a program that calculates and prints the total bill at a restaurant. Prompt the user for the…
A: Since you are not mentioning the programming language, here we are using Python to complete the…
Q: Write a program that prompts the user to enter two integer numbers A and B. The program must check…
A: Using if else and for loops we can solve this problem.
Q: Write a program that asks the user to enter two integers: n1 and n2 and prints the sum of all…
A: Given: Write a program that asks the user to enter two integers: n1 and n2 and prints the sum of all…
Q: Write a program that prompts the user to enter a three-digitinteger and determines whether it is a…
A: Program: import java.util.Scanner; public class Main { public static void main(String[] args) {…
Q: Write a program that asks the user to enter 10 numbers, that range from 10-100. Make sure that you…
A: Solution: Given, Write a program that asks the user to enter 10 numbers, that range from 10-100.…
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…
Q: Write a program that asks the user to enter a positive integer, as in the examples below. If the…
A: while True:#infinite loop is used, so that it can run until proper input is given try: n =…
Q: Write a program that prints a custom conversion table from Celsius temperatures to Fahrenheit and…
A: Objective: This program converts a range of given temperature in Celcius to Fahrenheit and Newton…
Q: Write a program that prompts the user to input the three coefficients a, b, and c of a quadratic…
A: Sample Response: #Python program to find the roots of quadratic equationimport math# function to…
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 2 images
- Write a program that prompts the user to enter the name, the number of children, and the basic salary of an employee. The program will then: • Calculate the bonus: • Calculate the new salary: Apply a tax of 10% and find the paid salary: The program will then display all the information needed as shown in the sample run below Sample Run: Enter the name of the employee: Jamal Enter the number of children of the employee: 4 Enter the salary of the employee (in $): 1500 The calculated bonus is $100 for 4 children. The new salary is $1600.0 The paid salary for Jamal is $1440.0Write a program that helps a company manage salaries of its employees. Your program should ask for the number of hours worked and the hourly rate of an employee than, display the salary. This program still asks the user to enter the information of many employees until enters a zero value. Sample Run: Enter the number of hours worked (negative nbr to end): 32 Enter hourly rate of the worker: 100 Your salary is $3200 Enter the number of hours worked (negative nbr to end): 40 Enter hourly rate of the worker: 5 Your salary is $200 Enter the number of hours worked (negative nbr to end): 42 Enter hourly rate of the worker: 10 Your salary is 5420 Enter the number of hours worked (negative nbr to end): 0Write a program that helps a company manage salaries of its employees. Your program should ask for the number of hours worked and the hourly rate of an employee than, display the salary. This program should allow the user to enter the information of many employees until enters -1. Sample Run: Enter the number of hours worked (-1 to end): 32 Enter hourly rate of the worker: 100 Balary is 03200 Enter the number of hours Worked (-1 to end) : 40 Enter hourly rate of the worker: 5 Balary is 3200 Enter the number of hours worked (-1 to end): 42 Enter hourly rate of the worker: 10 Salary is 0420 Enter the number of hours worked (-1 to end) : -1
- Please written by computer source Write a program that reads the subtotal and the gratuity rate, then computes the gratuity and total. For example, if the user enters 10 for subtotal and 15% for gratuity rate, the program displays $1.5 as gratuity and $11.5 as total. Sample Run Enter the subtotal and a gratuity rate: 10 15 The gratuity is $1.5 and total is $11.5 Class Name: Exercise02_05Given an airplane’s acceleration a and take-off speed v, you can compute the minimum runway length needed for an airplane to take off using the following formula: length = v2 / 2 * a Write a program that prompts the user to enter v in meters/second (m/s) and the acceleration a in meters/second squared ( m/s2 ) , then displays the minimum runway length needed to take off. Here is a sample run: Enter speed and acceleration: 60 3.5 [enter] The minimum runway length for this airplane is 514.286Write a program that prompts the user to enter two positive integers. If in the input there was a negative number, the program will ask the user to re-enter these integers. At the end, the program displays the inequality (or equality) between these two numbers as shown in the sample runs below: Sample run1: Enter 2 positive numbers: -5 9 Enter 2 positive numbers: 62 -2 Enter 2 positive numbers: 3 4 3 1 Sample run3: Enter 2 positive numbers: -2 9 Enter 2 positive numbers: 2 9 2 < 9 Sample run4: Enter 2 positive numbers: -5 -8 Enter 2 positive numbers: -2 -59 Enter 2 positive numbers: 41 41 41 = 41
- Write a program that prompts the user to enter an integer anddisplays whether the integer is an odd number or not. Here are the sample runs: Enter an integer: 200 ↵Enter200 is even number Enter an integer: 211 ↵Enter211 is odd numberGiven an airplane’s acceleration a and take-offspeed v, you can compute the minimum runway length needed for an airplane totake off using the following formula:length =v2/2aWrite a program that prompts the user to enter v in meters/second (m/s) and theacceleration a in meters/second squared (m/s2), then, displays the minimum runwaylength. Here is a sample run: Enter speed and acceleration: 60 3.5The minimum runway length for this airplane is 514.286Body Mass Index (BMI) is a measure ofhealth on weight. It can be calculated by taking your weight in kilograms anddividing, by the square of your height in meters. Write a program that prompts theuser to enter a weight in pounds and height in inches and displays the BMI. Noteone pound is 0.45359237 kilograms and one inch is 0.0254 meters. Here is asample run: Enter weight in pounds: 95.5 ↵EnterEnter height in inches: 50 ↵EnterBMI is 26.8573
- Question 1 Write a program that asks the user to enter the number of passengers in an airplane and the weight of baggage for these passengers. Your program should then print the average weight of all baggage; it should also print the weights in reverse order. Sample run: Enter the number of passengers in the airplane: 8 Enter the weights of 8 baggage: 16 45 60 13 24 29 50 30 The average weight of all baggage is 33.375 The entered weights in reverse order are 30 50 29 24 13 60 45 16Write a program that reads from the user the registration fees, number of credits required for a student to finish the course, the credit price, and the number of years the student is planning to finish the whole track. The program should calculate the cost to be paid by the user each year. Payment = (credit price X number of credits)/ years + registration fees The below Sample Run is to calculate the yearly payment of a course having 60 credits, 250$ for credit, 100$ for registrations fees each year, and 3 years to finish the track: Sample Run: Please enter registration fees, credit price, number of credits, and number of years: 100 250 60 3 The yearly required payment is: $5100.0Write a program that reads from the user the registration fees, number of credits required for a student to finish the course, the credit price, and the number of years the student is planning to finish the whole track. The program should calculate the cost to be paid by the user each year. Payment = (credit price X number of credits) / years + registration fees The below Sample Run is to calculate the yearly payment of a course having 60 credits, 250$ for credit, 100$ for registrations fees each year, and 3 years to finish the track: using java Sample Run: Please enter registration fees, credit price, number of credits, and number of years: 100 250 60 3 The yearly required payment is: $5100.0