List of Programs (Lab Session Exercises) i. Write a Java program to input month number and print number of days in that month. ii. Write a Java program to input any character and check whether it is alphabet, digit or special character. iii. Write a Java program to check whether a year is leap year or not. iv. Write a Java program to create Simple Calculator using switch case. v. Write a Java program to print multiplication table of any number. vi. Write a Java program to find sum of first and last digit of a number. vii. Write a Java program to check whether a number is palindrome or not. viii.Write a Java program to check whether a number is Armstrong number or not. ix. Write a Java program to convert Decimal to Binary number system. x. Write a Java program to print Pascal triangle upto n rows. xi. Write a Java program that takes a number from the user and generates an integer between 1 and 7. It displays the weekday name. xii. Write a Java program that takes three numbers from the user and prints the greatest number. xiii.Write a Java program to find the number of days in a month. xiv. Write a program in Java to input 5 numbers from the keyboard and find their sum and average. xv. Write a Java program to display the cube of the given number up to an integer. xvi. Write a Java program to display the pattern like a right-angle triangle with a number. xvii. Write a program in Java to make such a pattern like a right- angle triangle with a number which repeats a number in a row. xviii. Write a Java program to input electricity unit charges and calculate total electricity bill according 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

Java List of Programs.docx

  • 1.
    List of Programs(Lab Session Exercises) i. Write a Java program to input month number and print number of days in that month. ii. Write a Java program to input any character and check whether it is alphabet, digit or special character. iii. Write a Java program to check whether a year is leap year or not. iv. Write a Java program to create Simple Calculator using switch case. v. Write a Java program to print multiplication table of any number. vi. Write a Java program to find sum of first and last digit of a number. vii. Write a Java program to check whether a number is palindrome or not. viii.Write a Java program to check whether a number is Armstrong number or not. ix. Write a Java program to convert Decimal to Binary number system. x. Write a Java program to print Pascal triangle upto n rows. xi. Write a Java program that takes a number from the user and generates an integer between 1 and 7. It displays the weekday name. xii. Write a Java program that takes three numbers from the user and prints the greatest number. xiii.Write a Java program to find the number of days in a month. xiv. Write a program in Java to input 5 numbers from the keyboard and find their sum and average. xv. Write a Java program to display the cube of the given number up to an integer. xvi. Write a Java program to display the pattern like a right-angle triangle with a number. xvii. Write a program in Java to make such a pattern like a right- angle triangle with a number which repeats a number in a row. xviii. Write a Java program to input electricity unit charges and calculate total electricity bill according 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