K. K. Wagh Polytechnic, Nashik – 3.

Subject: Programming in ‘C’ Sub Code: 9017 Class: FYIF (IF/2/C) Academic Year: 2008 – 2009
Practical No. 3 Understanding operators in ‘C’: 1. Write a program to input two numbers from keyboard and find the result of subtraction of greater number – smaller number. 2. Input a year from keyboard and determine whether it is leap year or not using the conditional operator. 3. Accept three numbers from user and determine which of the two numbers or all three numbers are equal or not using logical operators. 4. Enter the amount saved in the bank from keyboard to a program. The interest rate to this amount is 5% per six months. Find out how much interest will be obtained on the amount saved for 1.5 years. 5. Imran’s basic salary is input through the keyboard. His dearness allowance is 40% of basic salary, and house rent allowance is 20% of basic salary. Write a program to calculate his gross salary. 6. Input a number from user and determine whether it is fully divisible by 2 and 5 both or not?

Kute T. B. (Subject Teacher)

CPR – Practical No. 3