problem 1: prepare a Java program which computes and prints the simple interest by using the formula:
Simple Interest = PNR / 100
Input values P, N, R should be accepted as command line input as shown below.
ex: java SimpleInterest 5 10 15
problem 2: prepare a program to find out sum of digits of a given number.
problem 3: The numbers in the given sequence are termed as the Fibonacci numbers.
0, 1, 1, 2, 3, 5, 8, 13,…………..
prepare a program by using do…..while loop to compute and print the first m Fibonacci numbers.
problem 4: prepare a program which converts a decimal number to Roman number. Decimal Number is accepted as command line input at the time of execution.
problem 5: prepare a program which prints prime numbers between 1 to n. Number n must be accepted as command line input.
problem 6: prepare a program to print the given output by using the for loop.
1
2 2
3 3 3
4 4 4 4
5 5 5 5 5
problem 7: prepare a Java program which accepts the radius of a circle and displays the options as follows:
a) Find out the diameter of a circle. (2* radius)
b) Find out the area of circle. (Π * radius * radius)
c) Find out the circumference of a circle. (2 * Π * radius)
d) Exit.
Use case statement to implement each option and display the corresponding output.
problem 8: Define a class called fruit with the given attributes:
a) Name of the fruit.
b) Single fruit or bunch fruit.
c) Price.
Define an appropriate constructor and displayFruit() method which displays values of all the attributes. prepare a program which creates 2 objects of fruit class and display their attributes.