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
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.
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...
A sequence is a list of numbers that are calculated based on a certain rule. For...
A sequence is a list of numbers that are calculated based on a certain rule. For instance, the progression described by the rule An = 2 ∗ n results in the numbers: 0 2 4 6 8 10 ··· 2 ∗ n. The sum of this sequence can be calculated as Sn = 0+2+4+6+8+10+···+2 ∗ n. Write a function that takes as input the number n and calculates the sum of the sequence up to the nth term (inclusive) for...
(Write in C++) Write a program that reads in two numbers and, if the input is...
(Write in C++) Write a program that reads in two numbers and, if the input is valid, outputs 2 times the product of the integers that lie between the two values (including the values themselves). If either number is not an integer, or if the first number is not less than the second number, just output an error message. The sample runs below should give the idea. User inputs are in bold. Important Notes: Your program should use a loop...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT