Question

Write an algorithm that adds up a sequence of twenty numbers and outputs the sum of...

Write an algorithm that adds up a sequence of twenty numbers and outputs the sum of the numbers as well as the average of the numbers. (Your algorithm MUST use the repetition control structure to read in and process the inputs.)

Homework Answers

Answer #1

SOLUTION:-

======================================================================================

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Write python code that reads a string with numbers and letters and outputs sum of the...
Write python code that reads a string with numbers and letters and outputs sum of the numbers and number of letters.
Step 1: Write a Java program that finds the sum of 10 numbers entered by the...
Step 1: Write a Java program that finds the sum of 10 numbers entered by the user. Step 2: Modify the previous program so that it asks the user how many numbers they have, inputs that many numbers, and finally outputs the average of their numbers. The messages to the user should be clear throughout.
instructions read in 4 numbers. sum up the 4 numbers. print the four numbers and the...
instructions read in 4 numbers. sum up the 4 numbers. print the four numbers and the sum Using the Marie editor and compiler, write a program that will satisfy these requirements. Cut and paste your code (from the editor) into the answer area of this question C+
Implement a 2-bit adder using only a 32x3 ROM. The adder adds two 2-bit numbers, {A1...
Implement a 2-bit adder using only a 32x3 ROM. The adder adds two 2-bit numbers, {A1 A0} and {B1 B0}. The adder also has a carry-in (Cin) input. Thus there are 5 inputs: A1 A0, B1 B0, Cin. There are 3 outputs, a 2-bit sum (S1 S0) as well as a carry-out (Cout). Include a diagram of the ROM: label inputs/outputs correctly and show the contents of ROM cells (0's/1's).
Write a NASM program that does the following: 1) Asks the user to enter three numbers...
Write a NASM program that does the following: 1) Asks the user to enter three numbers (each is a byte) A,B, and C 2) Adds up the numbers and stores the sum in variable D 3) Outputs the sum
Perl language and by using VS Code: Write a program that reads a number, adds up...
Perl language and by using VS Code: Write a program that reads a number, adds up the cube of all the digits, and displays the result. Run your code with the following test number: 1242 It should give 81. Please include screenshots of your outputs.
write an AVR C program code to create 5 inputs with corresponding 5 different outputs. The...
write an AVR C program code to create 5 inputs with corresponding 5 different outputs. The instruction is listed to follow.  Specify your 5 inputs and 5 outputs. Describe your method .The Conditions: ? AVR C code must be used , Any conditional statement must be used (e.g. IF statement or CASE statement) at least one time, must use the time delay for your output and Bit-wise logic and shift operator.
Use the dynamic programming approach to write an algorithm to find the maximum sum in any...
Use the dynamic programming approach to write an algorithm to find the maximum sum in any contiguous sublist of a given list of n real values. Analyze your algorithm, and show the results using order notation.
1) Write an algorithm to calculate the sum of the following series:           Sum =x-x3/3! +...
1) Write an algorithm to calculate the sum of the following series:           Sum =x-x3/3! + x5/5! – x7/7! +…….     Stop when the                     term<0.0001.    2) An internet service provider charges its subscribers per month as follows:           Data usage (n), in gbs           charges (NIS)           0.0<n<=1.0                                250           1.0<n<=2.0                                500           2.0<n<=5.0                              1000           5.0<n<=10.0                            1500                   n>10                                 2000          Write a C program to read the usage(n) from a file and print the charges to be paid by...
c++ Write a program that calls a function calculateSum to calculate the sum from -1 to...
c++ Write a program that calls a function calculateSum to calculate the sum from -1 to N. The function calculateSum has one parameter N of type integer and returns an integer which represents the sum from -1 to N, inclusive. Write another function calculateAverage that calculates an average. This function will have two parameters: the sum and the number of items. It returns the average (of type float). The main function should be responsible for all inputs and outputs. Your...