write a program in c++to calculate simple interest.........dont spam✌✌✌
Answers
Answered by
4
Answer:
Explanation:
/**
* C 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;
}
Similar questions