Nirma University Integrated B. Tech. (CSE) - MBA Programme Term - III Lab Manual - Object Oriented Programming (CSI0301)

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

NIRMA UNIVERSITY

Integrated B. Tech. (CSE)-MBA Programme


Term – III
Lab Manual - Object Oriented Programming (CSI0301)

Lab No. Programs


1. 1. Write a Java Program to display “Hello World” and ”Hi” messages .
2. Write a Java Program to take input from user and display the number with proper
message.
3. Write a program to convert seconds into HH/MM/SS Format.
4. Write a Java Program to take two numbers from user and perform addition,
subtraction, multiplex and division operation.

2. 1. Write a Java Program to check whether the input number is odd or even.
2. Write a Java Program to check whether the input number is positive, negative or
zero.
3. Write a Java Program to take marks of five subjects as an input and display grade.
(>=90% - A+, 70%-90% - A, 60%-70% - B+, 50%-60% - B, 35%-50% - C, <35% - F ).

3. 1. Write a Java Program to display digit in words. (Use Switch statement, for input :1,
output : one)
2. Write a Java Program to display the numbers divisible by 7 between 35 to 65 using
while loop.
3. Write a Java Program to display the numbers divisible by 3 or 5 between 123 to 190.
4 (Perform all programs using while loop.)
1. Write a Java Program to calculate addition of first 10 natural numbers.
2. Write a Java Program to calculate factorial of a given input number.
3. Write a Java Program to find out maximum digit from a given number.
5 1. Write a Java Program to check whether the entered number is Armstrong or not.
(i.e. 153 = 13 + 53 + 33) .
2. Write a Java Program to convert number to text. (i.e. 752 : Seven Five Two)
6 1. Write a Java Program to implement simple calculator using switch case.
2. Write a Java Program to verify whether the input number is prime or not.
3. Write a Java Program to print Fibonacci series.
4. Write a Java Program to find out addition of digits from a input number of odd and
even positions separately
7 1. Write a Java Program to print following pattern using for loop.
2. 1 3. *
1 2 * *
1 2 3 * * *
1 2 3 4 * * * *
1 2 3 4 5 * * * * *
4. 1 5. 1
3 2 1 1
4 5 6 1 2 1
10 9 8 7 1 3 3 1
11 12 13 14 15 1 4 6 4 1

You might also like