C Programming

C Program to read principle, time, and rate and find the simple interest

Write a program to take input from 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

Related Articles

Back to top button

Adblock Detected

Please turn off your Adblocker to view your content.