Call us at 0700-922-6559 or Click here

Write a program to find the simple interest, inputs are amount, period in years and rate of interest.

// C program to find the simple interst

#include <stdio.h>

// Driver code

int main()

{

// We can change values here for

// different inputs

float P , R , T;

printf(“Enter p,r, and t values \n”);

scanf(“%f %f %f”,&P,&R,&T);

// Calculate simple interest

float SI = (P * T * R) / 100;

// Print Simple Interest

printf(“Simple Interest = %f\n”, SI);

return 0;

}

Output:

Enter p,r, and t values 

40 500 1200

Simple Interest = 240000.000000

Leave a Reply

Your email address will not be published. Required fields are marked *