InterviewSolution
| 1. |
Develop an algorithm and flow chart to print all even numbers below 100 in descending order |
|
Answer» hm:1. Start2. Assign the variable i with 993. 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=99while(i!=0) if i%2==0: print(i) i=i-1Program 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.brainly.in/question/256358672. 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 namebrainly.in/question/18370913 |
|