C PROGRAMMING

write a c program to calculate simple intertest

#include <stdio.h>
#include <conio.h>
int main() {
int principal_amount, time;
float rate_of_interest, simple_interest;
printf("Enter principal amount : n");
scanf("%d",&principal_amount);
printf("Enter time : n");
scanf("%d",&time);
printf("Enter rate of interest : n");
scanf("%f",&rate_of_interest);

simple_interest = principal_amount*time*rate_of_interest/100;

printf("%f is the simple intrest",simple_interest);
getch();
}
Show More

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button