Discussion Forums

New User? Please read instructions!

C program to find simple and compound interest  

  RSS

thiyagarajan
Eminent Member
Joined: 6 months  ago
Posts: 26
27/01/2017 9:28 am  

I am given assignment for writing 50 C programs. I am listing all required c programs in fresh2refresh. Kindly provide C program to find simple and compound interest.


ReplyQuote
prakash
Eminent Member
Joined: 6 months  ago
Posts: 20
30/01/2017 10:22 am  

Hi, please use below C program for simple interest and compound interest.

#include<stdio.h>

#include<math.h>

int main()

{

        int p,t;

        float r,si,amount,ci;

        printf("Please enter principal,time and rate of interest");

        scanf("%d%d%f",&p,&t,&r);

        si=p*t*r/100;

//Simple Interest formula is p*t*r

        printf("\nSimple interest = %.3f",si);

//Compound Interest formula is below

        amount=p*pow((1 +r/100),t);

        ci=amount-p;

        printf("\nCompound interest = %.3f",ci);

}


ReplyQuote
  
Working

Please Login or Register

1. Ask your questions or clarify your/others doubts from,

✅ Online Discussion Forums by Fresh2Refresh.com





Share this website !!!
Facebook Twitter Linkedin

Close
We Support JALLIKATTU !!!
We Support JALLIKATTU!
By Fresh2Refresh.com
Show Your Support as well. Thanks!