Wednesday, November 25, 2015

Simple Interest Rate Solver in C

A simple program that I wrote in C language that will compute for the interest rate of a loan. I am using Turbo C 2.0 for DOS as my C compiler in this sample program.

If you  have some questions please send me an email at jake.r.pomperada@gmail.com and jakerpomperada@yahoo.com

My mobile number here in the Philippines is 09173084360.




Program Listing

#include <stdio.h>
#include <conio.h>

main()
{

float principal,rate,time,solve_interest;

principal=0.00;
rate=0.00;
time=0.00;
solve_interest=0.00;

clrscr();
printf("\tSimple Interest Rate Solver");
printf("\n\n");
printf("Enter the Principle Amount Loaned : Php ");
scanf("%f",&principal);
printf("Enter the Rate of Interest        : ");
scanf("%f",&rate);
printf("Enter the Time Period             : ");
scanf("%f",&time);

solve_interest = (principal*rate*time)/100;

printf("\n\n");
printf("The simple interest is Php %5.2f.",solve_interest);
printf("\n\n");
printf("\t End of Program");
getche();
}

No comments:

Post a Comment