C Program to calculate simple interest. This is the most basic and simple C program to understand the syntax of C programming language.
Simple Interest=(principle amount×rate of interest×time)/100
#include<stdio.h>
int main(){
int p,t;
float r,si;
printf("enter principle amount");
scanf("%d",&p);
printf("enter time");
scanf("%d",&t);
printf("enter rate");
scanf("%f",&r);
si=p*r*t/100;
printf("simple interest if %f",si);
return 0;
}
Output