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

Program questions

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

Program questions

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

1.

Write a program in Java to input a three-digit number and display their sum of
the digits.
2. Write a program in Java to input a two-digit number and display sum of the
digits' square.
3. Write a program in Java to input two numbers and check the last two digits are
equal or not with a suitable message.
4. Write a program in Java to input a number and check if it is five digit and if
it is divisible by nine or not.
5. Write a program in Java to input a three-digit number and display if the sum of
the cube of all the digits are equal to the number or not.
6. Write a program in Java to input a three-digit number and check sum of the
product of digits and sum of digits are equal to the number or not.
7. Write a program in Java to input a three-digit number and display its reverse
number.
8. Write a program in Java to assign three unequal numbers and display the greatest
number among them.
9. Write a program in Java to assign three unequal numbers and display the smallest
number among them.
10. Write a program in Java to input CP and SP of a book and display if it is
profitable or loss with the amount.
11. Write a program in Java to input Principal amount, Rate of Interest and Time.
Display the Amount.
12. Write a program in Java to input Salary of Mr. Rahul. He spends 30% in
household, 20% in books, 23% in other expenditures and rest
of it he puts in into his savings. Display the all the expenditures and savings
amount.

You might also like