Simple interest
#include <stdio.h>
int main() {
int principal, rate, time, simpleInterest;
printf("Enter the principal amount: ");
scanf("%d", &principal);
printf("Enter the rate of interest (%): ");
scanf("%d", &rate);
printf("Enter the time period (in years): ");
scanf("%d", &time);
simpleInterest = (principal * rate * time) / 100;
printf("Simple Interest: %d\n", simpleInterest);
return 0;
}
Comments
Post a Comment