Question: Question 4 . Given a positive integer N , find the lowest multiple of N made up of only 9 ' s and 0 '
Question Given a positive integer find the lowest multiple of made up of only s and
s
Program Inputs
Enter a positive whole number N:
The user will always follow instructions, no error checking needed!
Program Outputs
Lowest multiple with only s and s: XXX
Replace XXX with the lowest multiple found.
Solution Process
Ask the user for N
Repeatedly create a multiple of N and test if all digits are or :
Create the next multiple of N called M
Repeatedly divide M by to check each digit:
Check the remainder when dividing M by
If the remainder is or reduce M by a factor of ignore any decimals
If the remainder was another number, try the next multiple of N
Test Case :
Enter a positive whole number N:
Lowest multiple with only s and s:
Test Case :
Enter a positive whole number N:
Lowest multiple with only s and s:
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
