Program to calculate simple interest - 6 Players blogs for technology

give us your feedback

People Online

Breaking

ads

Post Top Ad

Wednesday, May 22, 2019

Program to calculate simple interest


#include <stdio.h> int main() { float principle, time, rate, SI; /* Input principle, rate and time */ printf("Enter principle (amount): "); scanf("%f", &principle); printf("Enter time: "); scanf("%f", &time); printf("Enter rate: "); scanf("%f", &rate); /* Calculate simple interest */ SI = (principle * time * rate) / 100; /* Print the resultant value of SI */ printf("Simple Interest = %f", SI); return 0; }
let say
principle=1200
time = 2
rate= 5.4




Enter principle (amount): 1200
Enter time: 2
Enter rate: 5.4
Simple Interest = 129.600006

No comments:

Post a Comment

ads1

Post Top Ad