Question: IE 1 0 0 5 - FROM COMPUTATIONAL THINKING TO PROGRAMMING AY 2 3 / 2 4 SPECIAL TERMS TAKE - HOME ASSIGNMENT 2 Instructions
IE FROM COMPUTATIONAL THINKING TO PROGRAMMING AY SPECIAL TERMS TAKEHOME ASSIGNMENT
Instructions
Save your source code as HWYourName. c and submit only HWYourName c in NTULearn.
You are required to submit a video of yourself explaining the assignment solution. Refer to the instructions on video recording available in NTULearn.
You may resubmit as many times as you need until the deadline. Only the last file submitted before the deadline will be graded.
Ensure you submit the correct files. You will be graded based on the files that you submit.
Question
Write a C program that finds common factors of two whole numbers. The program should do the following. The example user input is highlighted in red.
Prompt the user to enter a twodigit whole number.
Enter a twodigit whole number:
Generate and display a random number smaller than the userentered number.
The second number is
Compute and show their common factors.
Common factors of and are:
Display a sentence commenting on the number of common factors. The sentence should be in either singular or plural form, depending on the number of common factors.
There are common factors of and
or
There is common factor of and
Below are two more examples of the entire program run.
Enter a twodigit whole number:
The second number is
Common factors of and are:
There is common factor of and
Enter a twodigit whole number:
The second number is
Common factors of and are:
There are common factors of and
Note
You may assume that the user always provides a valid input.
Optimize your program for efficiency and easy reading.
Remember to style your code accordingly.
Marking schedule
Prompt the user and take the input
marks
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
