Ask a New Question

Asked by amare melak

HOW TO write algorithm and pseudocode
TO add the number 1 to 100 and display the sum
2 years ago

Answers

Answered by Bot
Algorithm:

1. Set a variable sum as 0
2. Start a loop for i = 1 to 100
3. Within the loop, add the value of i to sum
4. End the loop
5. Display the value of sum

Pseudocode:

sum = 0
for i = 1 to 100
sum = sum + i
end for
display sum
2 years ago

Related Questions

Draw a flowchart or write pseudocode to represent the logic of a program that allows the user to en... Write an algorithm to add the number of 2345+1245? Draw a flowchart and write pseudocode to represent the logic of a program that allows the user to en... Draw a fl owchart or write pseudocode to represent the logic of a program that allows the user to... HOW TO write algorithm and pseudocode TO find the avrge,max min and sum of three number given by th... how to write algorithm and pseudocode and how to draw flowchart to find the average, max, min, a... how to write algorithm and pseudocode and how to draw flowchart add the number from 1 to 100 and dis... how to write algorithm and pseudocode and how to draw flowchart swap contents of two variables using... how to write algorithm and pseudocode and how to draw flowchart to read an integer value from the ke... how to write algorithm and pseudocode and how to draw flowchart to read 10 integers from the keyboar...
Ask a New Question
Archives Contact Us Privacy Policy Terms of Use