1.
Write a C program to calculate and print the simple interest.
#include<stdio.h>
#include<conio.h>
int main()
{
float p, t, r,
i;
printf("Enter
principal: ");
scanf("%f",
&p);
printf("Enter
time: ");
scanf("%f",
&t);
printf("Enter
rate: ");
scanf("%f",
&r);
i = (p*t*r)/100;
printf("Simple
Interest = %.2f", i);
return 0;
}
No comments:
Post a Comment