This program is written in pseudocode."Design a program that asks the user to enter a store's sales for each day of the week. The amounts should be stored in an array. Use a loop to calculate the total sales for the week and display the result."I'm not sure how to combine array's with loops. I can do them separately but I'm not sure where to even begin when dealing with them both.
Q: Using a for loop, count the number of value in the array temperatures[[] that are greater than…
A: Program structure Import Scanner class from the package util to read the array elements from the…
Q: using an array write a program that will ask the user to enter a temperature for each day of the…
A: The approach and program to find the highest, lowest and the average temperature of a week by using…
Q: Create a flowchart that will ask the user for 10 numbers and store the numbers in the array in the…
A: Flowchart is a diagrammatic representation of a sequence of logical steps of a program. The various…
Q: In a program you need to store the identification numbers of 10 employees (as i nt s)and their…
A: GIVEN: In a program you need to store the identification numbers of 10 employees (as i nt s)and…
Q: Java Write code statements to create an array based on user values and determine if that array…
A: The above question is solved in step 2 :-
Q: Write a program to simulate the rolling of two dice. The program should use Math.Random and…
A: Program: Programs are used to provide instructions to the computer system. It is mainly for…
Q: You may use an array to test whether the random generator is fair; that is, whether each possible…
A: According to the Bartelby guidelines we are suppose to answer only one question at a time. Kindly…
Q: The program enters the scores of an test for 10 students and saves them as an array. Then the…
A: Use a loop to iterate over the array to accept input and then compare the values
Q: Write a program to finish the following tasks: • It allows the user to input a value to determine…
A: #include <iostream>#include <stdlib.h>#include <time.h>using namespace std; int…
Q: Pseudocode was used to create this software. "A 7-digit lottery number generator application must…
A: here, I have to write a pseudocode for the above question.
Q: write a program to read an unknown number of scores (double type) from the keyboard and calculate…
A: Actually, program is an executable software that runs on a computer.
Q: This program is written in pseudocode."Design a program that generates a 7-ddigit lottery number.…
A: As you have not specified the programming language, we have solved this question using C++…
Q: A positive integer greater than 1 is said to be prime if it has no divisors other than 1 and itself.…
A: Here, Code instruction is given.
Q: Design a program that asks the user to enter a store’s sales for each day of the week. The amounts…
A: Actually, algorithm is an step by step process.
Q: Hi, I am required to: Create an array of 100 integers using a random generator. ( 1 for loop)…
A: create an array which able to store 100 integer numbers.Random class is used for generating 100…
Q: te and test a design to ask the user how many people are in a ra ng a loop, input the name of each…
A: Answer :
Q: Question 1 Write a program, ArrayRange, that asks the user to input integers and that displays the…
A: The solution contains use of arrays, loops, condtional statements.
Q: Write a program that declares an array of 5 integers. Populate the array by asking 5 integer numbers…
A: As you have not mentioned any specific language so I provide the output and code screenshot in C++
Q: Write a program (code only) to read an unary array and then extract the negative elements from it in…
A: Answer : Here is the code : Private Sub Command1_Click() Dim arr1(10) As IntegerDim arr2() As…
Q: You must use at least two different arrays - These are, in effect, parallel arrays: One for Adult…
A: Actually, program is an executable software that runs on a computer,
Q: Write a program that lets the user enter 10 values into an array. The program should then display…
A: As per the requirement program is completed. Note: In the question any programming language is not…
Q: Given the following, use a for loop to display the contents of the array (use cout to display):const…
A: The C++ program to display the content of an integer array by using for loop and cout is given…
Q: Create a program that add two 2D-Arrays. Prompt the user to input dimensions for row and column for…
A: Problem Description: Prompt user to enter the row and column for matrix 1 Prompt user to enter the…
Q: At the start of the program, it will ask the player how many rounds of Rock-Paper- Scissors they…
A: Solution: I implemented the code in Java with all mentioned requirements and output format,…
Q: This program will create an array of 12 random integers (between 1-9) and remove all numbers less…
A: File name: "Solution.java" class Solution { public static void main(String[] args) {…
Q: Write a flowchart and c program that does the following: Asks the user for the average temperature…
A: Step 1 : Start Step 2 : Declare an array of doubles named temperature of size 12. Step 3 : Define a…
Q: Create an array and store 10 multiples of 5 and print it out. Use for loop to generate the multiples…
A: EXPLANATION: - The integer variable num for generating the table is declared and initialized having…
Q: Based on the previous question. Use a loop to prompt the user to enter the amount sold of each…
A: Ans: Code: #include <iostream>#include<string.h>using namespace std;int averange(int…
Q: In this problem you will write a program that will randomize the elements of an array created by the…
A: Let an array's size be n: Run the array till n/2 position. Then, if you: swap the 0th element with…
Q: Create a program that ask the user to input 10 numbers using array, the program will identify the…
A: Step-1: Start Step-2: Declare an array ar of size 10 Step-3: Take 10 inputs from the user and store…
Q: This program is written in pseudocode."Design a program that asks the user to enter a store's sales…
A: Program code #1:
Q: Design a program that asks the user to enter a store’s sales for each day of the week. The amounts…
A: Program approach This program is to show sale of the week from Sunday to Saturday Declare the main…
Q: Given the following array declaration: int array[30]; Note that you DON’T know the values in the…
A: To access 4th element, you must use array[3] because array index starts from 0. Similarly for 30th…
Q: When I was a kid, I used to watch this TV game show, Deal or No Deal? in the game, there are…
A: Iterate over the array from beginning to ending and compare each and every element with the input…
Q: Ask the user to enter a size of array between 2 to 10. Based on the size entered, write a loop which…
A: import java.util.*; class SplitClass { public static boolean splitEqual(int[] arr, int size){…
Q: Create a simple program using array with any type of loop that will ask the user to input a grade in…
A: Given requirement, Create a simple program using an array with any type of loop that will ask the…
Q: This program is written in pseudocode."Design a program that generates a 7-ddigit lottery number.…
A: This pseudocode explains how to create a 7-digit lottery number. These 7 digits are randomly…
Q: Write a program that calculates your final grade. The program prompts the user to enter 4 grades and…
A: The program that uses arrays and loop statement. Declare an array grade of size 4. Then read four…
Q: Using a multidimensional array, create a triangular-shaped array. You will ask the user how many…
A: A multi-dimensional array is an array of arrays. 2-dimensional arrays are the most commonly used.…
Q: Write a program using 2D array to keep track stationary store inventory. The store sells various…
A: #include <iostream>#include <string>using namespace std; int n, row =0, col=0; void…
Q: Write a program that asks the user to input the sales of 10 salesperson and store them in an array.…
A: Array, which stores a fixed-size sequential collection of elements of the same type. An array is…
Q: write a python program to find whether how many students have scored a zero in a course. Use arrays…
A: marksOfStudents=[12,15,20,0,21,13,30,0,14,0] #an array of markscount=0;…
Q: In a program you need to store the identification numbers of 10 employees (as ints) and their weekly…
A: A) int id[10] ; // To hold ID numbers float weeklypay [10] ; / / To hold…
Q: e a loop to calculate the total sales for the week,
A: a program that asks the user to enter a store’s sales for each day of a 7 day week. The amounts…
Q: Create an array that will hold 6 doubles. Assign a unique value to each spot in the array, one by…
A: The code for the given problem is below written in java- import java.util.Scanner; public class Lab…
Q: The student names and the grades for four tests for Mr. Smith’s class have been placed in parallel…
A: First of all, you need to have an array of strings to store names Then, you need to have for more…
Q: Design an algorithm for a problem that processes results of a swimming competition. The program will…
A: The algorithm is a process of solving a given problem. This is implemented before the code. Declare…
This
"Design a program that asks the user to enter a store's sales for each day of the week. The amounts should be stored in an array. Use a loop to calculate the total sales for the week and display the result."
I'm not sure how to combine array's with loops. I can do them separately but I'm not sure where to even begin when dealing with them both.
Trending now
This is a popular solution!
Step by step
Solved in 2 steps
- This program is written in pseudocode."Design a program that generates a 7-ddigit lottery number. The program should have an Integer array with 7 elements. Write a loop that steps through the array, randomly generating a number in the range of 0 through 9 for each element. Then write another loop that displays the contents of the array."Just like my previous question, I'm not sure how to combine arrays with loops, in addition to the random function. Asking the same question again as the last answer was in C++ and I needed it in pseudocodeThis program is written in pseudocode."Design a program that generates a 7-ddigit lottery number. The program should have an Integer array with 7 elements. Write a loop that steps through the array, randomly generating a number in the range of 0 through 9 for each element. Then write another loop that displays the contents of the array."Just like my previous question, I'm not sure how to combine arrays with loops, in addition to the random function.This program is written in pseudocode."Design a program that asks the user to enter a store's sales for each day of the week. The amounts should be stored in an array. Use a loop to calculate the total sales for the week and display the result."I'm not sure how to combine array's with loops. I can do them separately but I'm not sure where to even begin when dealing with them both.Asking the same question again because the previous answer didn't help much unfortunately.
- I have an array of the first 50 Fibonacci numbers in the picture. Your program should ask the user for a number between 5 and 21. Using that input as a location in the array, with that location and the next three locations (for example base, base+1, base+2 and base+3) you will multiply the outer values, base and base+3, (the first and last of the four). Do the same for the inner values (base+1 and base+2 multiplied) and then double that value. These two values form the two sides of a right triangle. Now find the hypotenuse. Remember the Pythagorean theorem, which says a2 + b2 = c2. Our two sides are a and b, so we square each of them (remember a * a = a2, so just multiply each value by itself) and add them together. That gives you c2. Now all you need do is take the square root of that sum. Given that the sqrt method normally returns a floating-point value (a double), we must force it to return a long integer for us in this case, so use the following line (with your own…You must use at least two different arrays - These are, in effect, parallel arrays: One for Adult Meals One for Child Meals Remember to use a "for" loop for each array You should have totals in $ amount for: Adult Meal costs For example: class1; and class2 Overall totals, combining all categories Percentage for the total categories – the % amount is your choice; for the program outcome shown below, 45% was used Hints and Suggestions: You can set your own catered meal prices – for example, adult meals are $10 You can set how many adults/children meals are sold in each category – for example, 3 adult meals soldA positive integer greater than 1 is said to be prime if it has no divisors other than 1 and itself. Write a program that asks the user to input an integer greater than 1, then display all of the prime numbers that less than or equal to the number entered. The program should work as follows: • Once the user has entered a number, the program should display an array with all of the integers from 2 up through the value entered. • The program should then use a loop to step through the array. The loop should pass each element to a method that displays the element whether it is prime number. Your result should look like, for example: Enter an integer greater than 1: 9 2, 3, 4, 5, 6, 7, 8, 9 2 is prime 3 is prime 4 is not prime 5 is prime 6 is not prime 7 is prime 8 is not prime 9 is not prime Using java programming
- Design a program that will use a pair of nested loop to read the company's sales amounts. The details are as follows: -KDS Company has 3 departments: 1. Dept X 2. Dept Y 3. Dept Z. Design a program that will read as input each department's sales for each quarter of the year, and display the result for all divisions. Use a two dimensional array that will have 3 rows and 4 columns and show how the data will be organized. Please provide solution using Python. Thank you.Please submit your solution to the lab instructor once you have your program working. Your lab instructor will tell you how (s)he would like you to turn it in. Failure to submit will result in a zero. Write a program that asks the user to input two integers a and b. Then create an array that has all integer from a to b. Print out the array. (Don’t forget to consider the situation of a=b, a<b, and a>b.) Example 1: Input two numbers: 6 2 Array is [6, 5, 4, 3, 2] Example 2: Input two numbers: 4 8 Array is [4, 5, 6, 7, 8] Pass the above array as a parameter to a method called average and return the average and print it out in the main method. (Do not use Math library to get the average.) Please attach your screenshot below to each question a and b.Write a loop snippet (just a piece of code, not the whole program) that will sum every third element in a 1D array. The size of the array is held in the variable MAX. You will start with the first element in the array. The name of the array is testarray.
- Write a program to simulate the rolling of two dice. The program should use Math.Random and util.Random object to roll the first and second die. Using a two dimensional array to tally the number of times each sum appears using the random number generator methods. Your program should: 1. Display a welcoming message 2. Ask the user how many sides each die has 3. Create the 2-d array to hold the frequency counter of each possible sums 4. Ask the user how many times they want the dice to be rolled using both methods 5. Print the expected frequencies and actual frequencies and percentages each sum appeared in both methods in a tabular format. 6. Repeat steps 3 to 5 as long as the user wants. 7. End with a closing message See the sample output for the output format. Your percentages must be displayed with 2 places after the decimal. Use printf to format your output. Note: if a die has 6 sides, the sum of the values will vary from 2 to 12, with 7 being the most frequent sum, and 2 and 12…I am just started to learn Java. My professor has gone over all our projects so I feel comfortable with the honor code to ask for help in designing this. Thank you. In Java, Design a program that generates a 7-digit lottery number. The program should have an integer array with 7 elements. Write a loop that steps through the array, randomly generating a number in the range of 0 through 9 for each element of the array. Write another loop that displays the contents of the array.Write a program that creates three floating point arrays. Fill the first two arrays with 25 floating point numbers using loop structures, as follows: fill the first array with the loop counter value and fill the second array with the loop counter value squared. Finally, write a loop that adds the corresponding elements in the first two arrays and puts the result in the corresponding element of the third array. Display all three arrays using the format for counter; element + element = element. make sure to comment and explain when solving this problem.