C Program To Calculate Simple Interest

C Program Calculate Simple Interest

Example

#include<stdio.h>

void main() {
  float Principal, Rate, TimePeriod, SI;

  printf("Enter Principal: ");
  scanf("%f", & Principal);

  printf("Enter Rate: ");
  scanf("%f", & Rate);

  printf("Enter Time: ");
  scanf("%f", & TimePeriod);

  SI = (Principal * Rate * TimePeriod) / 100;
  printf("Simple Interest: %ft", SI);
}

Output:

Enter Principal: 1000
Enter Rate: 2
Enter Time: 1
Simple Interest: 20.000000

Leave a comment