Write a program that asks the user to enter the amount that he or she has budgeted for a month. A loop should then prompt the user to enter each of his or her expenses for the month and keep a running total. When the loop finishes, the program should display the amount that the user is over or under budget.
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: Write a program that will correctly lists all factors of an integer entered by the user. The user
A: Algorithm - Step 1 - Start step 2- declare a integer variable n and i , and assign i= 1 step 3- Take…
Q: Design a program with a loop that asks the user to enter a series of positive numbers. The user…
A: if statement evaluates whether a condition is equal to true or false.
Q: You are writing a program for a bookstore that has a membership rewards program. This membership…
A: Since no programming language is mentioned, I am using python. Algorithm: Start Initialize…
Q: Write a program with a loop that lets the user enter a series of integers. The user shouldenter −99…
A: Given : Write a program with a loop that lets the user enter a series of integers. The user should…
Q: I need to write a program that calculates the number of private offices in a high rise building. The…
A: The given problem is related to programming language where the no of floors, no of private offices,…
Q: The distance a vehicle travels can be calculated as follows: distance = speed time. For example, if…
A: Programming language is missing in the question. So we will answer this program in C++. If you want…
Q: Write a loop to request integer values from the console until an even value is entered.
A: While doing programming in any programming language, you need to use various variables to store…
Q: Write program that asks the user to enter the amount that he or she has budgeted for a month. Using…
A: #include <stdio.h> int main(){ int budget,expense,sum=0,exp; printf("Enter budget: ");…
Q: Write a program that asks the user to enter a word. The program will then display the word for as…
A: SUMMARY: - Hence, we discussed all the points.
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: I need help writing a program that calculates the balance of a savings account at the end of a…
A:
Q: Write a program that prompts the user to enter a monthly saving amount and displays the account…
A: Note: Since no language is mentioned, therefore answering the given question in python language. #…
Q: This is a continuation from the previous question. Pervious question answer is float hours =…
A: The code consists of an infinite while loop which will stop only when user enters a valid number of…
Q: Write a program that uses nested loops to collect data and calculate the average rainfall over a…
A: #include<iostream> using namespace std; int main(){ int numberOfYears=0, totalRainfall=0;…
Q: Write a program that will print the message “Computer Science is cool!!” 10 times. Use a while loop.…
A: As there is no programming language mentioned so program is attempted in c++ language 1. Write a…
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: Design a VI in LabVIEW to display the sum of first 'n' numbers using for loop, e.g., if user enters…
A: here in this question we will develop program which will accept number from user and then it will…
Q: Write a program that uses a while loop to do the following: Repeatedly asks the user to enter a…
A: Algorithm: Start READ num IF num !=0 small=large=num while(num!=-1): READ num IF…
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 with a loop that lets the user enter a series of positive integers. The user should…
A: There are two programs and they are not interlinked. So as per our guidelines we only answer the…
Q: Write a loop to request integer values until a positive value is entered. Example Output Enter an…
A: Programs: Programs are the instructions given to the computer to perform certain tasks, the…
Q: Write a program that will prompt the user for the number of students in Mr. Zapanta's Grade 12…
A: Based on the input number use the condition whether to enter loop or not and keep on checking…
Q: Develop a program that inputs a number from the user using for loop. It display number if its…
A: In the c program, include the necessary libraries and create the main function to perform the…
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 enter the amount that he or she has budgeted for a month. A…
A: The javascript code is embedded in the HTML page using the script tag. Take monthly budget as input…
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: The program should be written in python 1. first ask the user to enter the number of students in…
A: Use a list to store store scores of each student Lists has len() method to find the number of number…
Q: Write a program that displays a weekly payroll report. A loop in the program should ask the user for…
A: Answer: The program has shown below- #include<iostream> #include<stdlib.h> using…
Q: A country club, which currently charges $2500 per year for membership, has announced it will…
A: Note: In this question, the coding language is not specified then we are doing this question in the…
Q: Using Python, write a program with a loop that asks the user to enter a series of negative numbers.…
A: We have to write a Python program to the given set of conditions.
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 loop to request integer values until a factor of 10 is entered. Example Output Enter an…
A: Factors of 10 are 1, 2, 5, 10. So, if any of these integers is given, the program should stop. As…
Q: Write a program that allows the user to enter a series of exam scores. The number of scores the user…
A:
Q: Write a program that allows the user to enter a series of exam scores. The number of scores the user…
A: Following is the python program to calculate the average of a series of exam scores: Approach:…
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 sentinel controlled while loop that accumulates a series of test scores input by the user,…
A: Given: Write a sentinel controlled while loop that accumulates a series of test scores input by the…
Q: Description of the Problem Write a program that inputs your student number and printout your…
A: In this code, our goal is to add the details of a student and user enter a student id, check whether…
Q: Write an expression that executes the loop while the user enters a number greater than or equal to…
A: Program Approach:- 1. Include header file 2. Create the class NonNegativeLooper 3. Create the object…
Q: Write a program that inputs the miles driven and the gallons used for multiple trips and displays…
A: Since here no programming language is specified. So, we are providing the program code in C++. The…
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: answer c++ question Write a while loop that will ask the user to enter 10 names
A: THIS IS A MULTIPLE BASED QUESTION. ONLY FIRST PART IS SOLVED. KINDLY SEND THE REMAINING QUESTIONS ON…
Q: create a flowchart of a program that asks a user to enter any number until the number entered is an…
A: The flow chart is been drawn where it takes the input from the user and determines whether odd or…
Q: each of the expenses (zero indicates the user is done with entering an expense) for the month and…
A: CODE:- import java.util.Scanner; public class Main { public static void main(String[] args) {…
Q: Write a complete program that: 1. Uses a do...while loop to prompt the user to enter a count that is…
A: Answer :
Q: Write a program that inputs your student number and printout your Biography when the student number…
A: In this code, our goal is to add the details of a student and user enter a student id, check whether…
Q: Using any loop of your choice create a program that will prompts the user for two numbers and do…
A: Note: The given program is in C programming language.
Q: Write a program that asks the user to enter today’s sales for five stores. The program shouldthen…
A: The program is written in C++ programming language. If you want the program in some other…
Q: distance = speed time For example, if a train travels 40 miles per hour for 3 hours, the distance…
A: Code: #include<iostream>using namespace std;int main(){int s,h,d;cout<<"What is the…
Write a
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images
- (Misc. application) a. Write a program that continuously requests a grade to be entered. If the grade is less than 0 or greater than 100, your program should print an appropriate message informing the user that an invalid grade has been entered; else, the grade should be added to a total. When a grade of 999 is entered, the program should exit the repetition loop and compute and display the average of the valid grades entered. b. Run the program written in Exercise 2a and verify the program by using appropriate test data.6. Distance Traveled The distance a vehicle travels can be calculated as follows: distance = speed time For example, if a train travels 40 miles per hour for 3 hours, the distance traveled is 120 miles. Write a program that asks the user for the speed of a vehicle (in miles per hour) and how many hours it has traveled. The program should then use a loop to display the distance the vehicle has traveled for each hour of that time period. Here is an example of the output: What is the speed of the vehicle in mph? 40 How many hours has it traveled? 3 Hour Distance Traveled 1 40 2 80 3 120 Input Validation: Do not accept a negative number for speed and do not accept any value less than 1 for time traveled.This program requires the student to create a programming loop. The program's loop with loop between 5 and 50 times. Each loop will represent one week of the user eating and buying food. Each week the user will input the amount he or she spent on food. If the person spends more than $250 then the program will output "You are going to get fat." If the person spends less than $50.55 then the program will output "You are going to starve." After the final loop the program will display the lowest amount spent on any one week along with the most spent on any one week.
- 2. While Loop Write a program, using a while loop, that asks the user to enter their monthly income. The program should then prompt the user to enter their expenses for the month. The program should keep a running total. Once the user has finished entering their expenses the program should then display if the user is over or under budget. • The output should display the monthly budget, the total expenses and whether the user is over or under budget. Use a empty return (enter key) to end the loop. Name the source code file yourName_labó 2.py. Test and run the program. Capture the output console and save it as an image file named yourName_labó_output6_2.jpg. • Submit the .py and the image files through Canvas. Part 1: For Loop Number Cube ----- 1. 2. 8. 27 64 125 216 343 512 729 10 1000 Part 2: notes/tips for the while loop activity Part 2: while loop Enter monthly incone: 1000 Enter your monthly expense or 0 to stop: 750 Enter your monthly expense or 0 to stop: 85 Enter your monthly…Python programming Write a program that generates a random number and asks the user to guess what the number is. If the user's guess is higher than the random number, the program should display "Too high, try again." If the user's guess is lower than the random number, the program should display "Too low, try again." The program should use a loop that repeats until the user correctly guesses the random number. TY!The distance a vehicle travels can be calculated as follows: Distance = Speed X TimeDesign a program that asks a user for the speed of a vehicle in miles per hour and how many hours it has travelled (Assume the two values are integers). Your program should then use a loop to display the distance the vehicle has traveled for each hour of that time period. (For example, entering 50 mph and 4 hours should produce output like: Hour 1: 50 miles, Hour 2: 100 miles, Hour 3: 150 miles, Hour 4: 200 miles. )
- Write a program that displays a weekly payroll report. A loop in the program should ask the user for the employee number, gross pay, state tax, federal tax, and FICA withholdings. The loop will terminate when 0 is entered for the employee number. After the date is entered, the program should display totals for gross pay, state tax, federal tax, FICA withholdings, and net pay.The distance a vehicle travels can be calculated asfollows: distance = speed time. For example, if a traintravels 40 miles per hour for 3 hours, the distancetraveled is 120 miles. Write a program that asks the userfor the speed of a vehicle (in miles per hour) and howmany hours it has traveled. The program should then usea loop to display the distance the vehicle has traveledfor each hour of that time period.You will write a program that calculates gas milage, also known as fuel economy. The program will use a while loop to repeatedly ask the user for the number of miles driven and gallons of gas used at their last fill up. On each iteration of the loop, your program will calculate the mileage for each fill up. The user will be able to exit the loop by pressing the enter key. After the user exits the loop, the program will print the cumulative gas mileage, by dividing the cumulative number of miles by the cumulative number of gallons. The floating point output should be printed to one decimal place of precision. Here is an example of how the program should work: Your Personal Fuel Economy Number of miles traveled (or enter to exit):380 Number of gallons needed: 12 Mileage this tank: 31.7 Number of miles traveled (or enter to exit): 235 Number of gallons needed:9 Mileage this tank: 26.1 Number of miles traveled (or enter to exit): Average mileage: 29.3
- Question#2. The distance a vehicle travels can be calculated as fallout: Distance = Speed * Time For example, if a train travels 60 miles-per-hour for three hours, the distance [raveled is 120 miles. Write a program that asks for the speed of a vehicle (in miles-per-hour) and the number of hours it has traveled. It should use a loop to display the distance a vehicle has traveled for each hour of a time period specified by the user. For example, if a vehicle is traveling at 40 mph far a three-hour time period, it should display a report similar to the one chat follows: Hour Distance Traveled 1 90 2 100 3 150 Input Validation: Do not accept a negative number for speed and do not accept any value les than 1 for time traveled.Hello, Last question needing help with. 3.) Design a program that asks the user to enter the amount that he or she has budgeted for a month. The loop should then prompt the user to enter each of his or her expenses for the month, and keep a running total. When the loop finishes, the program should then display the amount that the user is either over or under budget for.1. first ask the user to enter the number of students in the range of 1 to 10. 2. then the program asks the user to enter the number of tests (in the range of 1 to 5) 3. Then use a loop to collect the scores for those many tests for each student. The outer loop will iterate once for each student. The inner loop will iterate several times, once for each test. Each iteration of the inner loop will ask the user to enter the score for a test of a student.