Write a program using a Loop structure that takes Five inputs of sales for item 1 – item 5 from the user during runtime. The program should use Running -Total to calculate the sales.
Q: Write a program to generate the numbers following: a) (-1, 3, -5, 7, -9, 13, -15, 17, -19, 23) on…
A: #include <stdio.h> int main() { int i, j, rows; printf("Enter the number of rows: ");…
Q: Write a program that would generate the following pattern. 0 -1 -1 -1 -1 -1…
A: I created a code in python to print this pattern also give the output screenshot
Q: Write a program using loops to generate following pattern.…
A: Since the question did not specify the programming language the program has been developed using…
Q: Write a program that asks the user to enter today’s sales for five stores. The programshould then…
A: Given:- Write a program that asks the user to enter today’s sales for five stores. The programshould…
Q: Write a program to print the numbers 2 to 10 in increments of two on the same line. The output of…
A: As per our guidelines we are supposed to answer only one question So please post the other question…
Q: 1. Write a program that calculates the squares and aubes of the index values from 0 to 10.…
A: Solution: Approach: Include necessary header files in the main function print the values using…
Q: Four experiments are performed, each producing six test results. The results for each experiment are…
A: Actually, program is a executable software that runs on a computer.
Q: In C++, if the statement ( int a=5, b=2; ) is written at the beginning of the program, then the…
A: In step 2, you can see the program output. In step 3, I will give you the final anwer.
Q: Write pseudocode that prints out 3 offices, with 5 employees each. You must use a nested loop. Your…
A: Note :- You have not mention the language of the program for output , so i'm answering your question…
Q: The university is planning for an industrial visit to an ABC company. The faculty has to create a…
A: The program is written in Python. Check the program screenshot for the correct indentation. Please…
Q: A loop X has a nested loop Y that has another nested loop Z. Z has a print statement. The print…
A: #include <iostream>using namespace std;int main() {int i,j,k; for(i=0;i<2;i++) for…
Q: TASK 5: Write a program with a meaningful loop calculation that uses a parallelized loop. Explain…
A: Step 1 Parallelized loop means, The loop which doesn't depend on the previous loop and all…
Q: Write a program using a Loop structure that takes Five inputs of sales for item 1 – item 5 from the…
A: code snippet:
Q: Write a C++ program that accepts five values of meters, one at a time, and converts each value…
A: do { cout<<"\nEnter value in meter: "; cin >> meter; if (meter<60) {…
Q: write a C++ program. Write a program that calculates the occupancy rate for a hotel. The program…
A: C++ program to calculate the occupancy rate for a hotel. Prompt the user to enter the number of…
Q: Write a program using Nested loops that ask the user to input number of rows from 1 to 13, if the…
A: 1) Since programming language is not specified, I have written program in python 2) Below is program…
Q: Design an interactive input loop that scans pairs of integers until it reaches a pair in which the…
A: If a number to divide the other number evenly, then this number is to be exactly half of other…
Q: Write a loop that runs 10 times and inputs data from the user. That data is added to a running…
A: Step 1: Start Step 2: Declare variables(one for user input and other for running total with initial…
Q: Write a C++ program. A person goes to office three days Friday, Monday and Wednesday in a week. For…
A: Program to display the salary of a person, that goes to office three days a week, for 4 weeks in a…
Q: Write a program that uses nested loops to display the diamond pattern shown below.…
A: z
Q: Create a conditional/looping program problem that will make use of Making selections using ranges,…
A:
Q: python language - Write the syntax for a double nested for loop (with indices i and j go from 0 to…
A: for i in range(23): for j in range(23): if j >= 0 and j <= 3: print(j,…
Q: Write a Python software that prompts the user for the amount of values they wish to join. The…
A: Please find the answer to the above question below:
Q: Create a program using C++ Goto loop that would ask the user to input a number and to input a range.…
A: Logic: Declare variables. Accept number and range from user. Create label for goto statement.…
Q: Write a program to generate a table of conversions from Fahrenheit to Kelvin for values from 0…
A: According to the Question below the Solution: Solution:
Q: Write a nested loop to print all factors of each value from 1 to max inclusive: Example Output (if…
A: #include<iostream>#include<string.h>using namespace std; int main(){ int num1=0; int…
Q: Write an algorithm (pseudo code) for a program that display a person name x times. Use For loop,…
A: 1. For Loop for(i=1;i<100;i++) print "Bartleby"
Q: Write a program using nested for loops to print a star frame. The width and height of the frame is…
A: 1) Below is C++ program using nested for loop to print star pattern based on width entered by user…
Q: A while loop is a form of Select one: a. transitive loop b. definite loop c. indefinite loop d.…
A: The problem is based on the basics of loops in programming languages.
Q: Write a program that display the following output (horizontal graph) using loops. Enter 10 numbers…
A: Read input as string of numbers and then split them to store in a list For each value in list, print…
Q: Write a program that output the following using loops. value of x : 19 value of x : 18 value of…
A: Given: Write a program that output the following using loops. value of x : 19 value of x :…
Q: Write a Basic program to calculate Y value if the condition (Y <0) break the loop and Y equation as…
A: Algorithm: Start Read n value Initialize x and d to 1 Initialize y to 0 Calculate…
Q: write table for the final values of i and x that is generated by the following VB program segment? i…
A: i=0 x=5 Do while(i<=10) if i mod 2=0 then x=x+i i=i+1 Loop
Q: Write a program that use loops to print the following patterns separately, one below the other. In…
A: The C++ code along with the the snapshot of code and output is given below:
Q: Write a program that uses a while loop to determine how long it takes for an investment to double at…
A: Python program is coded in the next step using the while loop.
Q: write a python program that prints a 3 column table showing the circumference and area of ten…
A: Programming approach Import the random module for generating a random radius. Import constant "pi"…
Q: Write a program that prints a 3-column table showing the circumference and area of ten circles of a…
A: We have used random module to get random number. We have taken low integer for random radii and high…
Q: "Program C" 1. Squares Looping random numbers and manipulating those values are fun, too! Why…
A: As given, I need to write a C program that askes user to enter random numbers continuously and print…
Q: C++ PROBLEM Write a loop to print all multiples of 3 from 20 down to 10 inclusive on a single line.…
A: A simple solution is to iterate over all the number in reverse order from high range to lower range…
Q: in python for glass box testing of a while loop, you should test cases where: a) the while loop is…
A: Glass Box Testing. Glass box is a test method that checks the structure of the program and obtains…
Q: Write a program that performs a survey tally on beverages. The program should prompt for the next…
A: use an infinite loop for accepting votes till user enters -1 Finally, number of votes has to be…
Q: Write a program that prints multiples of 9 in descending * order on a single line. * The program…
A: C++ Program for above : #include <iostream> using namespace std; int main() { cout…
Q: Task 02 Find the sum of the following sequence using loops and print the result a.…
A: Actually, Assembly language is a low level programming language. It uses mnemonic codes and labels…
Q: The instructions in a _____________________ loop might not be processed at all, whereas the…
A: Pretest loop: In a pretest loop, the test condition is evaluated before entering the loop. If the…
Q: An electrical manufacturer test five generators by measuring their output voltages at three at three…
A: Given: An electrical manufacturer test five generators by measuring their output voltages at three…
Q: Write a program that prints a 3-column table showing the circumference and area of ten circles of a…
A: Programming language is missing in the question. So we will answer this program in Python. If you…
Do not use functions
Trending now
This is a popular solution!
Step by step
Solved in 5 steps with 3 images
- Write a program using a Loop structure that takes Five inputs of sales for item 1 – item 5 from the user during runtime. The program should use Running -Total to calculate the sales. The should apply 6% SalesTax program The program should give a discount of 4% if the total sales is greater than $5000 The program should give a discount of 5% if the total sales is greater than $7000 The program should validate the input as numbers only (Must Enter a Number) The output of the program should be as follow: Provide different outputs to cover (1-6) 1. The five items entered for sales calculations 2. The subtotal of sales without taxes 3. The total sales with taxes 4. The final total of no discount $5000 6. The final total of discount if sales > $7000Design a program that uses nested loops to collect data and calculate the average rainfall over a period of years. The program should first ask for the number of years. The outer loop will iterate once for each year. The inner loop will iterate twelve times, once for each month. Each iteration of the inner loop will ask the user for the inches of rainfall for that month. After all iterations, the program should display the number of months, the total inches of rainfall, and the average rainfall per month for the entire period. Modularize the program. Present clear formatted code with comments. I need this coded in pseudocode, please.PROBLEM: Write a program using a Loop structure that takes Five inputs of sales for item 1 - item 5 from the user during runtime. The program should use Running -Total to calculate the sales. • The program should apply 6% Sales Tax. o The program should give a discount of 4% if the total sales is greater than $5000. o The program should give a discount of 5% if the total sales is greater than $7000. o The program should validate the input as numbers only (Must Enter a Number). The output of the program should be as follow: Provide different outputs to cover (1-6). 1. The five items entered for sales calculations. 2. The subtotal of sales without taxes. 3. The total sales with taxes. 4. The final total of no discount $5000. 6. The final total of discount if sales > $7000.
- Overview This program will prompt a user for a start and a limit, it will then while-loop through, doubling the iterator each pass, until the limit is reached. Expected Output Example 1 Enter the start of the loop: Enter the limit of the loop: 25 The current value is 3 The current value is 6 The current value is 12 The current value is 24 The last value of current that was less than 25 was 24 Example 2 Enter the start of the loop: 25 Enter the limit of the loop: 102 The current value is 25 The current value is 50 The current value is 100 The last value of current that was less than 102 was 100 Specifications • You should submit a single file called M5A2.py • It should follow the submission standards outlined here: Submission Standards Your program populate an integer named start using input • Your program populate an integer named limit using input Your program must use an iterator named current Your program must move through the values using a while-loop Tips and Tricks That last…python Write a program that runs like a cashier in a store. The program should use a while loop and prompt for the quantity and unit price of each item being purchased. The number of different items cannot be known in advance so the loop should continue until zero is entered for the quantity. A subtotal should be printed after each item's data has been rung up. See Sample Output. When the loop ends the program should report the number of different itemspurchased and the total amount due. SAMPLE OUTPUT: Enter item quantity or zero to quit 2 Enter unit price of item 2.50 Subtotal is $5.00 Enter item quantity or zero to quit 1 Enter unit price of item 7.99 Subtotal is $7.99 Enter item quantity or zero to quit 3 Enter unit price of item 2.39 Subtotal is $7.17 Enter item quantity or zero to quit 0 You purchased 3 different items Please pay $20.16a. A bowling team consists of five players. Each player bowls three games. Write a program that uses a nested loop to enter each player's individual scores and then computes and displays the average score for each bowler. Assume that each bowler has the following scores. Use two different loop structures for outer loop and inner loop. For example, if you use "for" as the outer loop structure, the inner loop should be "while" or "do.... while". 1st bowler: 286 2nd bowler: 212 3rd bowler: 252 232 4th bowler: 192 201 265 215 216 235 5th bowler: 186 252 186 236 272 b. Modify the program written for Exercise 3a to calculate and display the average team score. (Hint: Use a second variable to store the total of all the players' scores.)
- This program in C++ obtains a series of letter grades as input from a user. The program should calculate and output the total grade points and the grade point average (note: you may have to track the total number of inputs and the grade points to calculate the grade point average). The algorithm should execute 3 times for testing purposes. Use the appropriate loop for the main structure of the program that will stop accepting letter grades when the user inputs X. Also, choose the appropriate selection statement to convert the letter grade to the correct grade points. Additional Requirements: • Use appropriate data types and variable names throughout the code. • Use constants appropriately. • Adhere to the style guidelines for the class • Adhere to proper style & structure guidelines for the class • The goal of this assignment is to demonstrate the use of selection and repetition statements, so please be careful in choosing the correct constructs.This program in C++ obtains a series of letter grades as input from a user. The program should calculate and output the total grade points and the grade point average (note: you may have to track the total number of inputs and the grade points to calculate the grade point average). The algorithm should execute 3 times for testing purposes.Use the appropriate loop for the main structure of the program that will stop accepting letter grades when the user inputs X. Also, choose the appropriate selection statement to convert the letter grade to the correct grade points.Additional Requirements:• Use appropriate data types and variable names throughout the code.• Use constants appropriately. Output needs to look like the image below.Problem: Calculate movie charges for each customer attending a movie, use a sentinel value, -1, to exit the program. take input for customer age ages 0-6 are FREE ages over 6 to 18 is $12 ages over 18 to 55 is $15 over 55 gets Senior Citizen discount and is $5.00 Output the customer charge, accumulate the charges for each customer within the loop structure, once the loop is exited, display the total earning for that movie showing Submit pseudocode * Be sure to NOT use a compound boolean expression in your Selection Structure, its is not needed if you design your Selection Structure correctly.
- Write a program that uses nested loops to collect data and calculate the average rainfall over a period of years. The program should first ask for the number of years. The outer loop will iterate once for each year. The inner loop will iterate twelve times, once for each month. Each iteration of the inner loop will ask the user for the inches of rainfall for that month. After alliterations, the program should display the number of months, the total inches of rainfall, and the average rainfall per month for the entire period.Design and write a program that uses nested loops to collect data and calculate the average rainfall over a period of years. The program should first ask for the number of years. The outer loop will iterate once for each year. The inner loop will iterate twelve times, once for each month. Each iteration of the inner loop will ask the user for the inches of rainfall for that month. After all the iterations, the program should display the number of months, the total inches of rainfall, and the average rainfall per month for the entire period. i. Assume the user will enter valid data (Integer/Float). ii. The outer loop will iterate once for each year and the inner loop will iterate twelve times once for each month. iii. Assume the user will enter 1 or more number of years for number of years. iv. Assume the user will enter positive number (0.00 or more) for rainfall in inches for each month. v. The program should round the rainfall average to a maximum of two decimal places.4. Task 3: Using a nested loop Write a program that takes a bank account balance and an interest rate as an input. And then outputs the value of the account in 5 years. The output should show the value of the account for two different methods of compounding interest: annually and monthly. When compounded annually, the interest is added once per year at the end of the year. When compounded monthly the interest is added in 12 times per year. On annual interest, you can assume that the interest is posted exactly one year from the date of deposit. In other words, you do not have to worry about interest being posted on a specific day of the year, like December 31. Similarly, you can assume monthly interest is posted exactly one month after. Since the account earns interest on the interest, the account should have a higher balance when interest is posted more frequently. Be sure to adjust the interest rate for the time period of the interest. If the rate is 5%, then when posting monthly…