Programming

Principle, Time, and Rate and Find the Simple Interest

Write a program to take input from the user

  1. Principle
  2. Time
  3. Rate

And find out the simple interest where simple interest = (p*t*r)/100.  

C Code

#include<stdio.h>
#include<conio.h>
void main(){

float p, t, r, si;

printf("enter principle:");
scanf("%f",&p);

printf("enter time:");
scanf("%f",&t);

printf("enter rate:");
scanf("%f",&r);

si = (p*t*r)/100;

printf("Simple Interest = %f", si);

getch();
}

Output

Tuts

About Author

Tutsmaster.org provides tutorials related to tech and programmings. We are also setting up a community for the users and students.