Simple Interest Program In C

#include<stdio.h>
#include<conio.h>
void main()
{
int amount,rate,time,ans;
clrscr();
printf("Enter principal amount=");
scanf("%d",&amount);
printf("\nEnter rate of interest=");
scanf("%d",&rate);
printf("\nEnter period of time=");
scanf("%d",&time);
ans=(amount*rate*time)/100;
printf("\nSimple interst=%d",ans);
getch();
}
Output:-
Enter principal amount=25000
Enter rate of interest=10
Enter period of time=2
Simple interst=242





Previous                                   Next

No comments:

Post a Comment