Looking For Anything Specific?

ads header

How to input principal, rate of interest, time and find out simple interest in C Programming Language ?

Write a program to input the values of principal, rate and time and calculate simple interest ?

 Program 
#include<stdio.h>
 void main()
{
     float p,r,t,si;
     printf("\n Input the value of p = ");
     scanf("%f",&
p);
     printf("\n Input the value of r = ");
     scanf("%f",&r);
     printf("\n Input the value of t = ");
     scanf("%f",&t);
     si=(p*r*t)/100;
     printf("\n Simple interest = %.2 f",si);
}

 Output 

Input the value of p = 5000
Input the value of r = 5
Input the value of t = 6
Simple Intrest = 1500.00

Post a Comment

1 Comments

If You Have Any Doubt, Please Let Me Know,