2. write a program to find Simple interest . accept principle , rate , time , from the user. please give the answers according to class 10 icse syllabus
Answers
import java.util.Scanner;
public class Simple_Interest
{
public static void main(String args[])
{
float p, r, t;
Scanner s = new Scanner(System.in);
System.out.print("Enter the Principal : ");
p = s.nextFloat();
System.out.print("Enter the Rate of interest : ");
r = s.nextFloat();
System.out.print("Enter the Time period : ");
t = s.nextFloat();
float si;
si = (r * t * p) / 100;
System.out.print("The Simple Interest is : " + si);
}
}
Answer:
PLEASE MARK MY ANSWER AS BRAINLEST!!!!!!!!!
Explanation:
Pictorial Presentation:
Sample Solution:
C Code: #include<stdio.h> int main() { int p,r,t,int_amt; printf("Input principle, Rate of interest & time to find simple interest: \n"); scanf("%d%d%d",&p,&r,&t); int_amt=(p*r*t)/100; printf("Simple interest = %d",int_amt); return 0; } ...
Flowchart:
C programming Code Editor: