// Simple Interest Program in C using For loop
int main() {
float x = 1, y, SI;
// `SI` = value of the simple interest
printf("Enter the principal (amount), time, and rate::\n");
for (int count = 1; count <= 3; count++) {
scanf("%f", &y);
// It will calculate the value of simple interest
x *= y;
if (count == 3)
SI = x/100;
}
// It will produce the final output
printf("\nSimple Interest = %.2f\n", SI);
return 0;
}