103k views
19 votes
Write an algorithm to print the first 100 odd numbers​

User Mike Ottum
by
2.8k points

1 Answer

11 votes

Answer:

ALGORITHM :

Step 1: Start

Step 2: Declare variable c of integer type

Step 3: Set c=0

Step 4: Repeat step 4.1 to 4.3 while (c<=100)

Step 4.1: if (c%2 != 0)

Step 4.2: then print c

Step 4.3 : c=c+1

Step 5: Stop

FLOWCHART:

Step-by-step explanation:

Write an algorithm to print the first 100 odd numbers​-example-1
User Stefan Koenen
by
3.0k points