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

Dms - 66de8e2f31210JAVA LAB ASSIGNMENT - 1 (Introduction)

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views1 page

Dms - 66de8e2f31210JAVA LAB ASSIGNMENT - 1 (Introduction)

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Assignment-1(Introduction)

1. Write a java program that will display “This is my first Java Program”.
2. Write a java program that will print your name 10 times. (Hints: Use for Loop)
3. Write a Java program to test the number is prime or composite.
4. Write a Java program to check whether a year is leap year or not.
5. Write a Java program to find sum of all even numbers between 1 to n
6. Write a Java program to check whether a number is palindrome or not.
7. Write a Java program to find first and last digit of a number.
8. Write a java program that will take input as two +ve integers M and N where M<N.
a). The program will display the numbers between M and N, which are divisible by 3
and 5.
b). Count the numbers which are divisible by 3 and 5(between M and N), then add those
numbers and display.
9. Write a java program that will count the number of primes between 37 and 129.
10. Write a java program that will compute GCD of two numbers.

You might also like