Assignment 5
Assignment 5
Assignment: 5
• Work out all programs and report the outputs during the lab class of 06-Jan-2023.
• If the assignment sheet is not complete, do the rest as homework.
• Put all your codes in a single pdf to upload in the Google Classroom before the
next day’s lab. Write your name, department, enrollment number, group number
on a top sheet. LATE SUBMISSION WILL BE PENALIZED.
2. Write a C function to compute the GCD of two integers and return the result to
the main ().
(The two integers have to be taken as input from the user in the main () and passed
as parameter to the function.)
4. Write a C function finding out the factors for a natural number N and print them
sequentially. Here, N has to be taken as the input in the main () and passed as
parameter to the function.
5. Write C functions to print the following patterns for n number of rows, here n
is an input taken from keyboard and passed as a parameter to the functions.
(Use loops and ASCII codes where ever needed.)