Lab Assignment for Week 7
CS1100 (April-June 2021): Introduction
to Programming
Instructors: Shweta Agrawal, Deepak Khemani, C Siva Ram Murthy, V.
Krishna Nandivada, Meghana Nasre.
Lead Teaching Assistants:
Viswajit Vishnu. Email: CS18S039@[Link] . Sriharsha
Chigullapally. Email: cs17d012@[Link] . Koushik Kiran Kumar.
Email: kkk@[Link] .
Instructions:
[Link] 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 :
(111,112) , (111,113) , … , (111,124) , (112,113) , (112,114) , … , (123,124)
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.