Write a program to compute simple interest program in c.
#include<stdio.h>
#include<conio.h>
void main()
{
float p,r,si;
int t;
clrscr();
printf("Enter the Principal Time and Rate of Interest\n");
scanf("%f%d%f",&p,&t,&r);
si=p*t*r/100.0;
printf("Simple Interest=%f",si);
getch();
}
Output:
Enter the Principal Time and Rate of Interest
100
5
6
Simple Interest=30.000000
No comments: