Draw a flowchart along with algorithm to print odd numbers from 1 to 20
Answers
Answered by
2
Answer:
Algorithm:
Step 1: Start
Step 2: Assign i=0
Step 3: Repeat steps 4,5&6 until i=100 reaches
Step 4: if i%2!=0 goto step 5
Step 5: Print i
Step 6: Compute i=i+1
Step 7: Stop
Flowchart:
Program code:
i=0
while i<100:
if i%2!=0:
print i
i=i+1
Attachments:
Similar questions
Computer Science,
3 months ago
Physics,
3 months ago
Chemistry,
3 months ago
English,
1 year ago
Math,
1 year ago