Saturday 10 December 2011

Write a program to calculate simple interest in c

#include
#include
main()
{
float a,b,c,d;
clrscr();
printf("Enter The Principal:-");
scanf("%f",&a);
printf("\n Enter The Rate:-");
scanf("%f",&b);
printf("\n Enter The Time:-");
scanf("%f",&c);
d=(a*b*c)/100;
printf("\n Interest is:-%f",d);
getch();
}


OUTPUT
Enter The Principal:10000
Enter The Rate:6
Enter The Time:2
Interest is:1200.00

No comments:

Post a Comment