Draw flowchart, pseudo code and scratch algorithm to compare between 3 numbers and print the largest number
psuedo code (written algorithm ):
start
1) input x,y,z
2) if x>y then go to step 3, else go to step 5
3) if x>z then print "the largest number is "+x and go to end, otherwise then go to step 4
4) print "the largest number is "+z and go to end
5) if y>z then go to step 4, otherwise then print "the largest number is "+y
end
Scratch algorithm:
total answers (1)
start bookmarking useful questions and collections and save it into your own study-lists, login now to start creating your own collections.
psuedo code (written algorithm ):
start
1) input x,y,z
2) if x>y then go to step 3, else go to step 5
3) if x>z then print "the largest number is "+x and go to end, otherwise then go to step 4
4) print "the largest number is "+z and go to end
5) if y>z then go to step 4, otherwise then print "the largest number is "+y
end
Scratch algorithm: