3. (Interest Calculator) The simple interest on a loan is calculated by the formula interest = principal * rate * days / 365; The preceding formula assumes that the rate is the annual interest rate, and therefore includes the division by 365 (days). Develop a program that will input principal, rate, and days for several loans, and will calculate and display the simple interest for each loan, using the preceding formula.

PHOTO EMBED

Thu Jan 18 2024 06:23:52 GMT+0000 (Coordinated Universal Time)

Saved by @kervinandy123 #c

#include <stdio.h>

int main()
{
    float i, r, p;
    int d;
    printf("Enter loan principal:");
    scanf("%f", &p);
    
    printf("Enter interest rate:");
    scanf("%f", &r);
    
    printf("Enter the term of the loan in days:");
    scanf("%d", &d);
    
    i=(p*r*d)/ 365;
    
    printf("The interest charge is P%.2f", i);
    return 0;
}
content_copyCOPY