Ask a New Question

Question

Design a program that generates the sum of numbers.

Given a number (user input) you need an application that will produce a sum of the numbers from 1 to that given number
12 years ago

Answers

Steve
read n
sum=0
for (i=1 to n) sum += i
12 years ago

Related Questions

Design a program that models the worm's behavior in the following scenario: A worm is moving towar... Design a program that will ask the user to enter the amount of a purchase. The program should then c... design a program that models the worms behavior in the following scenario. A snake is moving towards... Design a program in pseudocode that calculates the amount of money a person would earn over a period... how do I design a program using a flowchart, the program needs to compute state and county sales tax... Design a program that keeps on reading number until the user enter a zero value How do you design a program that asks for the sale figures, computes the total sales for the year, a... how do you design a program that asks the user to enter a store's sales for each day of the week. th... Design an induction program 38. A program generates a "random" number from a generator that uses a predetermined list of number...
Ask a New Question
Archives Contact Us Privacy Policy Terms of Use