0% found this document useful (0 votes)
2 views5 pages

Java Assignment1

The document contains a series of programming tasks in Java, including arithmetic operations, input handling, and string manipulation. It outlines specific requirements for calculating sums, products, averages, and binary conversions, as well as displaying patterns and ASCII values. Each task is designed to enhance Java programming skills through practical exercises.

Uploaded by

Vidhi Sharma
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)
2 views5 pages

Java Assignment1

The document contains a series of programming tasks in Java, including arithmetic operations, input handling, and string manipulation. It outlines specific requirements for calculating sums, products, averages, and binary conversions, as well as displaying patterns and ASCII values. Each task is designed to enhance Java programming skills through practical exercises.

Uploaded by

Vidhi Sharma
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/ 5

1. Write a Java program to print the result of the following operations.

Test Data:

a. -5 + 8 * 6

b. (55+9) % 9

c. 20 + -3*5 / 8

d. 5 + 15 / 3 * 2 - 8 % 3

2. Write a Java program that takes two numbers as input and display the product of two numbers?
3. Write a Java program to print the sum, multiply, subtract, divide and remainder of two numbers?

4. Write a Java program to display the following pattern:

Javva

Jaavvaa

J J aaaaa V V aaaaa

JJ a a V a a
5. Write a Java program that takes three numbers as input to calculate and print the average of the numbers?

6. Write a Java program to multiply two binary numbers?


7. Write a Java program to convert a decimal number to octal number?

8. Write a Java program to reverse a string?


9. Write a Java program to print the ascii value of a given character?

10. Write a Java program to print the odd numbers from 1 to 99. Prints one number per line?

You might also like