Write a program to calculate the simple interest where principle rs 1250, rate 8% and time 3 years.
Answers
Answered by
3
In order to write the program, firstly we should know the formula to calculate simple interest.
Here,
- P = Principle amount
- R = Rate of interest
- T = Time period
Now, I'll write my program in python since language is not mentioned in the question.
P = 1250
R = 8
T = 3
print(f"Simple interest is, {(P*R*T)/100}")
>>> Simple interest is, 300.0
- We have store the values in different variables namely P, R and T for Principle, Rate of interest and time period respectively.
- Now using the print() function, we can print the required result on the output screen.
- We have made use of f strings where we can add mathematically expressions or value of variable inside { }.
Answered by
3
Answer:
THE FOLLOWING IS IN A JAVA PROGRAM:
public class MyClass {
public static void main(String args[]) {
int principle = 1250;
int rate = 8;
int time = 3;
System.out.println(principle*rate*time/100.0);
}
}
Explanation:
PLEASE MARK ME AS BRAINLIEST!!!!
Similar questions