stephenpowellrules stephenpowellrules
  • 08-02-2022
  • Computers and Technology
contestada

design the logic for a program that allows a user to enter a number. display the sum of every number from 1 through the entered number

Respuesta :

jmann9574
jmann9574 jmann9574
  • 08-02-2022

Answer: int sum = 1, n;

do {cin>>n; sum+=n;}while (n!=0);

cout<<sum;

Explanation:

Answer Link

Otras preguntas

What is the value of 5 in 756? Write and draw to explain how you know
Is the punctuation in this sentence correct or incorrect? Aunt Amelia I think we should leave for home now. correct incorrect
I really need help with this Ik ow it’s not A
what is the x-intercept of y=-2(x-1)^2-1
a plumber's fees f are $75 fora house call and $60 per hour h for each hour worked. Write a function rule
I need help with Number 61 please
The sum of five times a number and -6 is -2.
who was the founder of christianity
Not quite sure how to find out if these are functions or not
what was hammurabi best known for?