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

W1_Java Lab

The document outlines the Java Programming Lab assignment for Week 1, due on January 30, 2024, focusing on programming concepts revision. Students are required to submit their code and running output in a specified format, covering various tasks such as printing 'Hello World', performing arithmetic operations, checking for prime numbers, and displaying patterns. Additional tasks include checking for palindromes, finding GCD, and counting digits in integers.

Uploaded by

chetanvasantala
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)
1 views

W1_Java Lab

The document outlines the Java Programming Lab assignment for Week 1, due on January 30, 2024, focusing on programming concepts revision. Students are required to submit their code and running output in a specified format, covering various tasks such as printing 'Hello World', performing arithmetic operations, checking for prime numbers, and displaying patterns. Additional tasks include checking for palindromes, finding GCD, and counting digits in integers.

Uploaded by

chetanvasantala
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

Java Programming Lab [ITPC-226]

Assignment Sheet: Week 1 [30th Jan, 2024]


(Topic: Programming concepts revision)
NOTE: All students must submit the programs (code with running output) of this
assignment in doc format to their respective faculty of Lab. Title of submission should be
as roll No_Group_1/2/3/4_Week No.

1. Write a program to print ―Hello World on the screen.


2. Write a program to print addition, subtraction, multiplication and division
where input should be taken from command line.
3. Write a java program to check whether a number is prime or not.
4. Write a java program to display Fibonacci series up to n.
5. Write a java program to display the following pattern.

* * * * * * *
* *
* *
* *
* *
* * * * * * * * * * *
* *
* *
* *
* *
* * * * * * *
6. Write a java program to check whether a number is palindrome or not.
7. Write a java program to find GCD of two numbers.
8. Write a java program to search a number from an array using linear
search.
9. Write a java program to display prime numbers between two intervals.
10. Write a java program to check whether a number can be expressed as
sum of two prime numbers.
11. Write a java program to display prime numbers between intervals using
method.
12. Write a java program to check whether a number is Armstrong number
or not.
13. Write a java program to display factors of a number.
14. Write a java program to count number of digits in an integer.
15. Write a java program to check whether a number is even or odd.

You might also like