Flowchart to print even numbers from 1 to 100
Asked by admin @ in Computer Science viewed by 498 People
Develop an algorithm and flow chart to print all even numbers below 100 in descending order
Asked by admin @ in Computer Science viewed by 498 People
Develop an algorithm and flow chart to print all even numbers below 100 in descending order
Answered by admin @
Algorithm:
1. Start
2. Assign the variable i with 99
3. Check whether i!=0 condition satisfies in looping.
4. If yes, check if i value is exactly divisible by 2 leaving the remainder 0 or not. If the 'if condition' says yes, print the number. Decrement the value of i by 1 in the loop irrespective of 'if condition'.
5. If no, terminate the loop.
6. Stop.
Flowchart: Check the ATTACHMENT given below.
Program 1 (Using while loop):
i=99
while(i!=0)
if i%2==0:
print(i)
i=i-1
Program 2 (Using for loop):
for i in range(99,0,-1):
if i%2==0:
print(i)
Learn more:
1. Draw a flowchart for a program which asks the user to enter a password. If the user enters “HiThere!” then print “Welcome”, and then end the program.
2. Write an algorithm and draw a flowchart to input name and age of a person and print eligible. If age >=18 else print Not Eligible along with name
Asked by admin @ in Math viewed by 339 persons
Asked by admin @ in Math viewed by 377 persons
Asked by admin @ in Math viewed by 363 persons
Asked by admin @ in Math viewed by 339 persons
Asked by admin @ in Math viewed by 359 persons
Asked by admin @ in Computer Science viewed by 331 persons
Asked by admin @ in Math viewed by 295 persons
Asked by admin @ in Math viewed by 347 persons
Asked by admin @ in Math viewed by 389 persons
Asked by admin @ in Math viewed by 366 persons
Asked by admin @ in Math viewed by 387 persons
Asked by maham237 @ in Mathematics viewed by 339 persons
Asked by admin @ in Math viewed by 343 persons
Asked by admin @ in Math viewed by 279 persons
Asked by admin @ in Math viewed by 311 persons
Asked by admin @ in Computer Science viewed by 19030 persons
Asked by admin @ in Computer Science viewed by 15816 persons
Asked by admin @ in Computer Science viewed by 10977 persons
Asked by admin @ in Computer Science viewed by 10407 persons
Asked by admin @ in Computer Science viewed by 8145 persons
Asked by admin @ in Computer Science viewed by 7845 persons
Asked by admin @ in Computer Science viewed by 6492 persons
Asked by admin @ in Computer Science viewed by 5796 persons
Asked by admin @ in Computer Science viewed by 5696 persons
Asked by admin @ in Computer Science viewed by 5479 persons
Asked by admin @ in Computer Science viewed by 4986 persons
Asked by admin @ in Computer Science viewed by 4976 persons
Asked by admin @ in Computer Science viewed by 4690 persons
Asked by admin @ in Computer Science viewed by 4492 persons