sudiptamang
sudiptamang sudiptamang
  • 18-06-2022
  • Computers and Technology
contestada

write an algorithm to calculate the sum of number between 1 to 100​

Respuesta :

viswarojha viswarojha
  • 18-06-2022

Algorithm

STEP 1: START.

STEP 2: DEFINE n, i, j.

STEP 3: SET sum =0.

STEP 4: SET n =100.

STEP 5: REPEAT STEP 6 to STEP 10 UNTIL i<=n.

STEP 6: REPEAT STEP 7 and STEP 8 UNTIL j<=i/2.

STEP 7: if i%j ==0.

STEP 8: sum =sum + j.Algorithm

STEP 1: START.

STEP 2: DEFINE n, i, j.

STEP 3: SET sum =0.

STEP 4: SET n =100.

STEP 5: REPEAT STEP 6 to STEP 10 UNTIL i<=n.

STEP 6: REPEAT STEP 7 and STEP 8 UNTIL j<=i/2.

STEP 7: if i%j ==0.

STEP 8: sum =sum + j.

Answer Link
Duckieys
Duckieys Duckieys
  • 18-06-2022



DECLARE sum : REAL
DECLARE count : INTEGER
sum = 0

FOR count






Answer Link

Otras preguntas

de que trata la fabula pirámide de piedras? que importancia tiene el dialogo en esta historia? que importancia tiene la colaboración? que enseñanza te deja esta
WHO GIVE THE CONCEPT OF INTERNET?
The Casals festival is an annual classical music event. T F
use the following ingormtation to create sentences comparing two equal things (in spanish)
I need the answers ASAP if anyone knows them thanks!
Can members of Congress be arrested for what they say in Congressional meetings?
please help solve for y 5x-4y=10
Why did the nazis anti-Semitic propaganda help contribute to the nazi campaign against Jewish peoples
What is ( -3 ) x ( -3 ) in exponential form
While mutations are rare, they may result in a hereditary disease. They occur because of _____. an error in DNA replication migration of organisms to a new pop