// A C program to Calculate simple interest using function
#include<stdio.h>#include<conio.h>
void si();
void main(){
si();getch();
}void si()
{
float si,p,t,r;
printf("\nEnter Prinicpal Amount:\t");scanf("%f", &p);
printf("\nEnter Period of Years:\t");scanf("%f", &t);
printf("\nEnter Rate of Interest:\t");scanf("%f", &r);
si = (p * t * r)/100;
printf("\nSimple Interest = %f\n", si);
}
Output:
Nhận xét
Đăng nhận xét