Data Types and Operators - Exercise 1
Implement a program to calculate the Simple Interest by using the formula given below and display the calculated Simple Interest.
Simple Interest = (principal*rate of interest*time)/100
Sample Input and Output
class Tester{
public static void main(String[]args){
int principal=5000;
float rate=10.0f;
byte time=5;
float interest=0.0f;
System.out.println((principal*rate*time)/100);
//Implementyourcodehere
}
}
No comments:
Post a Comment