0% found this document useful (0 votes)
42 views1 page

Assignment 3 PDF

The document outlines 7 programming assignments: 1) prevent division by zero when dividing two integers, 2) find the maximum of three numbers, 3) build a basic calculator, 4) calculate employee DA based on salary ranges, 5) check if a year is a leap year, 6) check if a character is a vowel or consonant, 7) calculate a student's division based on their subject marks percentage.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
42 views1 page

Assignment 3 PDF

The document outlines 7 programming assignments: 1) prevent division by zero when dividing two integers, 2) find the maximum of three numbers, 3) build a basic calculator, 4) calculate employee DA based on salary ranges, 5) check if a year is a leap year, 6) check if a character is a vowel or consonant, 7) calculate a student's division based on their subject marks percentage.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

ASSIGNMENT 3

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.

You might also like