Question: Section 1: Pseudocode - 50 points Problem 1 (25 points): Given two positive integers a and b, check if a is divisible by b.
Section 1: Pseudocode - 50 points Problem 1 (25 points): Given two positive integers a and b, check if a is divisible by b. If a is divisible by b, then the program should print "a is divisible by b". Otherwise, it should print "a is not divisible by b". (Ignore short-circuiting in parts c) and d)). a) (11 points) Write your algorithm using pseudocode to solve the problem. If you detect an error condition, print "error". b) (6 points) List a set of test cases with all possible outputs to make sure each statement will be executed. Write in the format [inputs][output], where the inputs are separated by commas. c) (4 points) What is the maximum number of operations executed in the program? d) (4 points) What is the minimum number of operations executed in the program?
Step by Step Solution
3.46 Rating (156 Votes )
There are 3 Steps involved in it
The image contains a problem statement and four associated questions I will guide you through each p... View full answer
Get step-by-step solutions from verified subject matter experts
