AnkitWebLogic

C - Find Simple Interest

Q7. WAP to input principal, rate and time and calculate Simple Interest. Simple Interest=Principal*Rate*Time/100. 1

#include<stdio.h>
void main()
{
    float p,r,t,si;
    printf("Enter Principal, Rate, Time: ");
    scanf("%f%f%f",&p,&r,&t);
    si = p*r*t/100;
    printf("Simple Interest = %f",si);
}
Enter Principal, Rate, Time: 5000
5.45
.5
Simple Interest = 136.250000

Advertisement