Lab Assignment For Week 7: CS1100 (April-June 2021) : Introduction To Programming
Lab Assignment For Week 7: CS1100 (April-June 2021) : Introduction To Programming
Instructions:
1.Your program MUST have comments written for all the important
statements explaining their functionality/purpose. A program with
insufficient set of comments will be penalized 15% of the grade.
2. Each required output must start from a separate line.
3. Hardcoding results to pass test cases will incur penalty.
Question 3:
Write a program that prints the GCD and LCM of every pair of numbers
between 110 and 125 (excluding both). In each pair, both numbers should
be different and order should not be considered, i.e. , there will be just 1
pair corresponding to (a,b) and (b,a).
For each pair of numbers, output the GCD and LCM separated by a
single space, followed by a newline.
The following should be the sequence in which you use the pairs :
Your program should use the functions GCD and LCM you have written in
Question 1 and 2 to compute the GCD and LCM of every pair of numbers.