Assignment 3 PDF
Assignment 3 PDF
1 Take two integers as input and divide the first by the second. Prevent division by zero.
2 Write a program to find the maximum number amongst three numbers.
3 Write a Program to implement a simple calculator to Add, Subtract, Multiply and Divide
the two numbers. Also add scientific operations in that.
4 Consider an organization, in which DA (Dearness Allowance) of an employee is calculated
depending on the basic salary (category) of employee.
Write a program to input basic salary of an employee and calculate DA as per following
rules:
For Basic Salary >= 10000 and <= 20000, 10% of basic salary.
For Basic Salary > 20000 and <= 50000, 15% of basic salary.
For Basic Salary > 50000 and <= 100000, 20% of basic salary.
For Basic Salary > 100000, DA is not given.
5 Write a Program to check whether a year given as input by user is Leap Year or not.
6 Write a program to check whether an alphabet entered by user is vowel or consonant.
7 The marks obtained by a student in 5 different subjects are input through the keyboard. The
student gets a division as per the following rules:
Percentage above or equal to 60 - First division
Percentage between 50 and 59 - Second division
Percentage between 40 and 49 - Third division
Percentage less than 40 - Fail
Write a program to calculate the division obtained by the student.