Final Round QP
Final Round QP
Write a C program to nd the LCM of two numbers. LCM (Least Common Mul ple)
of two numbers is the smallest posi ve number that can be divided by both
numbers without leaving a remainder. For example, the LCM of 15 and 25 is 75.
The reverse of a number means reversing the order of digits of a number. In this
ar cle, we will learn how to reverse the digits of a number in C programming
language. For example, if number num = 12548, the reverse of number num is
84521.
The median of a list of numbers is essen ally its middle element a er sor ng. The
same number of elements occur a er it as before. Given a list of numbers with an
odd number of elements, nd the median?
ti
fi
ti
fi
tt
ft
ti
ti
tti
tt
ft
ti
ti
Example: arr = [5,3,1,2,4]
The sorted array is arr=[1,2,3,4,5] . The middle element and the median is 3.
A leap year is a year that contains an addi onal day in February month i.e. February
29. It means that a leap year has 366 days instead of the usual 365 days.