C Program to Calculate Simple Interest
#include <stdio.h> int main(){ int amount, rate, time, interest; printf("Enter the principal amount : "); fflush(stdout); scanf("%d", &amount); printf("\nEnter the rate of Interest : "); fflush(stdout); scanf("%d", &rate); printf("\nEnter the period of time : "); fflush(stdout); scanf("%d", &time); interest = ( amount * rate * time ) / 100; printf("\nSimple Interest : %d",interest); return 0; }
Enter the principal amount : 1000 Enter the rate of Interest : 2 Enter the period of time : 12 Simple Interest : 240
( amount * rate * time ) / 100
Comments :