0% found this document useful (0 votes)
8 views

Conditional Assignments

Uploaded by

Mr. Robot
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

Conditional Assignments

Uploaded by

Mr. Robot
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

3.

Conditional statements
Assignment CW
1. Write a Java program to check whether a year is leap year or not
2. Write a Java program to check whether a number is divisible by 5 and 11 or not
3. Write a Java program to find maximum between three numbers
4. Write a Java program to input any alphabet and check whether it is vowel or consonant
5. Write a Java program to create Simple Calculator

Assignment HW
1. Write a Java program to check whether a number is negative, positive or zero
2. Write a Java program to input any character and check whether it is alphabet, digit or special character
3. Write a Java program to check whether a number is even or odd

1. Write a Java program print total number of days in a month


2. Write a Java program to input basic salary of an employee and calculate its

Gross salary according to following: Basic Salary <= 10000 : HRA = 20%, DA = 80% Basic Salary <= 20000 : HRA = 25%,
DA = 90% Basic Salary >20000 : HRA = 30%, DA = 95%
3. Write a Java program to input electricity consumption unit and calculate totalelectricity billaccording to the given
condition: For first 50 units Rs. 0.50/unit For next 100 units Rs. 0.75/unit For next 100 units Rs. 1.20/unit For unit
above 250 Rs. 1.50/unit An additional surcharge of 20% is added to the bill

You might also like