Write a program that prompts the user to enter a monthly saving amount and displays the account value after the sixth month. (You will use a loop to simplify the code and display the account value for any month.)
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: Write a program named CheckMonth that prompts a user to enter a birth month. If the value entered is…
A: Conditional statement : The "if-else" is a conditional statement that tests the condition before the…
Q: Write a program that calculates the occupancy rate for a hotel. The program should start by asking…
A: Answer: Executable Code: n = int(input("Floors on the hotel: "))occupied = 0unoccupied = 0totalRooms…
Q: write a program that enters the names of three of students, then for each student, the program will…
A: The program is written in Java. Please check the source code and output in the following steps.
Q: Write a program that uses a loop to ask the user for a number, then to print the first 10 multiples…
A: #include <iostream>#include<conio.h>using namespace std;int main(){ int n,i,t;…
Q: enter
A: import java.util.Scanner;public class Main{ public static void main(String[] args) {…
Q: Write a program that asks the user for a starting value and an ending value and then writes all the…
A: num1 = int(input("Enter starting value:")) num2 = int(input("Enter ending value:")) i = num1 while…
Q: Write a program that asks the user to enter the amount that he or she has budgeted for a month. A…
A: As there is no programming language mentioned so question is attempted in python language. enter…
Q: Write a program named CheckMonth that prompts a user to enter a birth month. If the value entered is…
A: Given that, Writing a program named CheckMonth that prompts a user to enter a birth month. If the…
Q: Write a program that prompts the user to enter five test scores and then prints the average test…
A: Note: since the programming language is not the question is implemented using C++.
Q: Using coding, write a program which prompt user for a celcius temperature, convert the temperature…
A: Given question has asked to write a program which prompt user for temperature in Celsius and convert…
Q: Write a program that displays the result of 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10.
A: NOTE - As here no programming language was mentioned so I have done it using Python language. Here…
Q: write a program with a loop that asks the user to enter a series of negative numbers. The user…
A: logic:- iterate an infinite loop read temp if temp>0 break loop else append…
Q: Write a program that generates a random number between 1 and 100 and asks the user to guess what the…
A: Lets see the solution.
Q: Write a program to prompt the user for hours and rate per hour to compute gross_pay. A sample run…
A: I am using c++ language Took two parameters as input from user and used the logic as pay= rate *…
Q: Write a program segment that computes 1+2+3+...+(n-1)+n, where n is a data value. Follow the loop…
A: Algo:- take value of n. use loop to iterate from 1 to n and add sum value . display first sum…
Q: Write a program that uses a Scanner to ask the user for a double. Then write a loop that counts from…
A: import java.util.Scanner; public class Main{ public static void main(String[] args) { Scanner…
Q: Write a program that generates a random number and asks the user to guess what the number is. If the…
A: Given: Write a program that generates a random number and asks the user to guess what the number is.…
Q: Write a program that prompts the user to enter the month and first day of the month, and displays…
A: /*program that prompts the user to enter the month and first day of the month, and displays all the…
Q: Create a program that reads two integers, a and b, from the user. Your program should compute and…
A: #asking user for inputa=int(input("Enter a number "))b=int(input("Enter a number "))#find…
Q: Write a program that asks the user for a positive integer value and that uses a loop to validate the…
A: NOTE: SINCE THE LANGUAGE OF THE CODE IS NOT MENTIONED, I HAVE USED C++ FOR THE SOLUTION. Define…
Q: Write a program that prompts the user to enter a time in seconds over 500 and then displays that…
A: you did not mention any programming language so i am solving this in java 1 first we have to take…
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 read two integers and displays their sum. Your program…
A: import java.util.InputMismatchException; import java.util.Scanner; public class Exercise_02 {…
Q: Write a program segment that computes 1+2+3+..+(n-1)+n, where n is a data value. Follow the loop…
A: PROGRAM CODE: import java.util.Scanner; public class Main { public static void main(String[]…
Q: It then has the user enter that number of scores and computes the average.
A: n=int(input("Enter number of tests : ")) # reading number of testsi=1s=0while(i<=n):…
Q: *Write a program that asks the user to guess your favorite number. The program should end when the…
A: Guessing a number will be done by using loop. IN the python programming language there are three…
Q: Write a program to find the Celsius value when Fahrenheit value reaches above 98.6 (Human body…
A: logic: - Input fahrenheit value and store it in variable F write celsius=(F-32)*5/9 display F value…
Q: Write a program that prints multiples of a number in * descending order on a single line. The…
A: Ans : Code: #include <iostream> using namespace std; int main(){ int multiple,startvalue;…
Q: Write a program that generates a random number between 1 and 500 and asks the user to guess what the…
A: C++ Program: #include <iostream>#include<cstdlib> using namespace std; //Main…
Q: Write a program that Requests a temperature from the user. Also asks if the temperature is in…
A: Ans: python is very sensitive about indentation.So, please take care about indentation.Copy the same…
Q: Write a program to have the user guess a number stored in the program. If he guesses right, tell him…
A: write a program to have user guess a number stored in the program,if he guess right,tell him so ,if…
Q: Write a program that prompts the user to input two integers. Using a while loop, output the…
A: Since the Programming language is not mentioned in the question, we will answer this question in C++…
Q: Write a program with a loop that lets the user enter a series of integers, followed by 99 to signal…
A: Code; #include<iostream> using namespace std; int main() { //declare variables needed…
Q: Write a program that displays the following pattern on the screen: * *** ***** *******
A: Given: Write a program that displays the following pattern on the screen: * *** ***** *******
Q: Write a program that prompts the user to enter the number of seconds, displays a message at every…
A: Program Code in Python seconds = int(input("Enter the number of seconds: "))while seconds > 2:…
Q: Write a program that generates a random number and asks the user to guess what the num- ber is. If…
A: C++ Code: #include <iostream> using namespace std; int main(){ int num, guess, tries = 0;…
Q: Write a program to print "Hello Coder!" 5 times using loop but in same line and not in different…
A: NOTE - I have used the python programming language. In python, we make use of the print() function…
Q: Write a program that prompt the user to enter the number of students and each student's score, and…
A: #include <iostream>using namespace std; struct student{ char name[50]; float marks;}…
Q: Write a program that will predict the size of a population of organisms. The program should ask the…
A: PROGRAMING CODE: #include <iostream>#include <iomanip>using namespace std; int main(){…
Q: A tennis club , which currently charges $150 per month for membership, has told the members that…
A: #note no programming language is mentioned so i was used c++ programming language…
Q: Write a program that asks user to enter two numbers. Then the program should print the even numbers…
A: Task : Write a program to print even numbers between two numbers. C++ program :- #include…
Q: Write a program that prompts the user to enter the name, the number of children, and the basic…
A: Since programming language not mentioned using Python CODE: # cook your dish herename=input("Enter…
Q: Write a program that prompts the user to enter the month and year and displays the number of days in…
A: February has 28 days in non-leap years and has 29 days in leap years
Q: Write a program that prompts the user to input an integer between 0 to 35. It the number is less…
A: Please find the answer below :
Q: Write a program (lab3.cpp) that finds the temperature that is the same in both Celsius and…
A: C++ program for the above problem is given below: #include <iostream> using namespace std; int…
Q: Write a program that reads the 10 student grades () from keyboard and calculates the class average.
A: Code in python programming language #Program to read grades of 10 students from teh keyboard and…
Q: Write a program to convert an integer to binary number. Ask the user to enter an integer and convert…
A: Write a C++ program to convert an integer to a binary number Answer: Given a decimal number as…
Write a program that prompts the user to enter a monthly saving amount and displays the account value after the sixth month. (You will use a loop to simplify the code and display the account value for any month.)
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 2 images
- 1. Write a program that asks the user for the price of several items sold until the user answers with an “N”. The program should accumulate the total of all prices entered. After the loop is finished, the program is to compute the sales tax of all items as 7% [0.07]. Finally, the program is to print out the total of the items, the sales tax due, and the total amount due on three separate lines.The cost of renting a room at a hotel is, say $100.00 per night. For special occasions, such as a wedding or conference, the hotel offers a special discount as follows: If the number of rooms booked at least 10, the discount is 10%; at least 20, the discount is 20%; and at least 30, the discount is 30%. Also if rooms are booked for at least three days, then there is an additional 5% discount. Write a program that prompts the user to enter the cost of renting one room, the number of rooms booked, the number of days the rooms are booked, and the sales tax (as a percent). The program outputs the cost of renting one room, the discount on each room as a percent, the number of rooms booked, the number of days the rooms are booked, the total cost of the rooms, the sales tax, and the total billing amount. Your program must use appropriate named constants to store special values such as various discounts.Body mass index (BMI) is a measure of health based on weight. It can be calculated by taking your weight in kilograms and dividing it by the square of your height in meters. Write a program that prompts the user to enter a weight in pounds and height in inches and displays the BMI. Note that one pound is 0.45359237 kilograms and one inch is 0.0254 meters.
- Questions 1. Write a program which asks the user to enter a six-digit number and print a new number by subtracting 1 to each of its digits. For example, if the number entered is 393201, the output should be displayed as 282190. Information on the console should be displayed similar to the Sample Run shown below. Sample Run: Enter a 6 digit number: 393201 Modified number is: 28219dImplement the following: 1) Use a loop to print all the numbers of multiples of 6 and multiples of 7 from 166 to 377 inclusive. 2) Use a loop to print all the numbers of multiples of 6 and multiples of 7 from 377 to 166 inclusive. Make sure to precisely match the output format below. Write your code in the ANSWER area provided below (must include comments if using code is not covered in the course). Example Output 168, 210, 252, 294, 336, 336, 294, 252, 210, 168,Scenario: You have been tasked with writing a program that reads the total price of the items brought into the hypermarket and calculates the value-added tax applied to the purchase based on the following rules. If the total price is between 0 and 100, no tax will be applied. Otherwise, if the total price is between 101 and 200, the program will apply a tax of 2% of the total price. Furthermore, if the total price is between 200 and 300, the tax is 5% of the total price. Finally, if the total price is greater than 300, the tax is 10% of the total price. hellp ):
- Write a program that prompts the user to enter a number with the range of 1 through 10. Validate input do not accept a value less than 1. The program should display the number and Roman numeral version of it separated by a tab. If the number is outside the range of 1 through 10, the program should display an error message. Use int function for input: int(input('Enter … ')) #input validation loop while number <1 : enter your code here Use for n in range(number+1): See Chapter 4 Sample Ouput: Number Roman Numeral 1 I 2 IIwhat is the algorithm? Write a program that prompts the user to enter a number with the range of 1 through 10. Validate input do not accept a value less than 1. The program should display the number and Roman numeral version of it separated by a tab. If the number is outside the range of 1 through 10, the program should display an error message. Use int function for input: int(input('Enter … ')) #input validation loop while number <1 : enter your code here Use for n in range(number+1): See Chapter 4 Sample Ouput: Number Roman Numeral 1 I 2 IIWrite a program that repeatedly asks the user to enter integer numbers (validation is not necessary). The program should continue to read numbers from the user until they enter a negative number (e.g., 3, 7, 3, 1, 6, 4, -1). Once the user enters a negative number, the program should stop repeating the prompt and print out the second largest number that the user has entered. You can assume the user will enter at least two non-negative (non-zero) numbers. Note: you may not use lists or other summary functions (max, min, etc.) for this problem. You should only need input/variables/looping/branching structures.Example:Enter positive integers: 3, 7, 3, 1, 6, 4, -1 The second largest number is: 6
- 4. A software company sells game cartridges for $99. Quantity discounts are given according to the following: 10 - 19 20% discount 20 49 O 30% discount 50 – 99 O 40% discount 100 + O 50% discount Write a program that asks the user how many games they purchased. The program should then display the amount of the discount (if any) and the total amount of the purchase after the discount is applied. Don't forget to add HST. 5. Earlier we wrote a BMI calculator. Enhance the program so that it displays a message indicating whether the person has optimal weight (BMI between 18.5 and 24.9), is underweight (BMI is less than 18.5), is overweight (BMI between 25 and 29.9), or is obese (BMI 30 or higher).A retail store grants its customers a maximum amount of credit. Each customer’s available credit is his or her maximum amount of credit minus the amount of credit used. Write a program that asks for a customer’s maximum amount of credit and then asks for the amount of credit used. The program should then properly display the customer’s available credit.Problem: A small company needs an interactive program to compute an employee’s paycheck. The payroll clerk will initially input the data, and given the input data, an employee's wage for the week should be displayed on the screen for the payroll check. The data for the employee includes the employee's hourly pay rate and the number of hours worked that week. Wage is equal to the employee's pay rate times the number of hours worked (up to 40 hours). If the employee worked more than 40 hours, wage is equal to the employee's pay rate times 40 hours plus 1½ times the employee's pay rate times the number of hours worked above 40. Instructions: Match the action at the left-side with the correct step number at the right-side (the attached picture). Note that it may be possible to group more than one related actions in the same logical step / process without altering the essence of the algorithm. In the program flow, input and checking of hourly pay rate should come before that of the number…