Tag Archives: Integer

C Program to check Leap Year (2 ways)

This program checks whether the input year is leap year or not. A leap year is exactly divisible by 4 except for century years (years ending with 00). The century year is a leap year only if it is perfectly divisible by 400. Leap Year : If a year is divisible by 4, 100 and 400 then it… Read More »

C Program to reverse a given number

In this example, you will learn to reverse the given number using these two methods. Examples : Input : 123 Output : 321 Input : 1995 Output : 5991 Approach used : We can reverse a number in c using loop and arithmetic operators. Take input number Find its quotient and remainder. Multiply the separate variable with 10… Read More »