Question
i gt 4 question based on the flow chart..need a detail answer for my understanding. Just need to answer the qns. 1) Can we reduce
i gt 4 question based on the flow chart..need a detail answer for my understanding. Just need to answer the qns.
1) Can we reduce number of iteration in while loop using %?
2) if we enter negative number will it still work?
3) To add counter loop i would suggest create variable count. Assign count =0 Assign count = count + 1 if B is not = 0
4)I want to know that in between the loop if B != 0 is true, will it be good if we can indicate some display on the following: - Display if A is more than B, then following by display the answer of A after A - B, and continue the loop again till the end, instead of display the answer in the end only.
Main Integer A Integer B Output "Enter two numbers. This algorith will find the greatest common denominator. InputA Input B True not (B 0) False False True B=B-A OutputA End
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started