Preview:
#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;
}
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter