Program to find compound interest

0
16
#include<stdio.h>
#include<conio.h>
void main()
{
   float p,t,r,ci;  /* p-> principle amount, t-> time in years,
                       r-> rate of interest and ci-> calculated interest */
   clrscr();
   printf("enter p, t,r\n);
   scanf("%f%f%f", &p,&t,&r);
   ci=p*pow((1+r/100),t);   /* gives compound amount, interest with principle 
                               amount */
   printF("\n compound amount is %2f\n",ci);
   ci=p*pow((1+r/100),t)-p; /* gives only compound interest */
   printf("\n compound interest is %.2f\n",ci);
   getch();
}
   output: 
   enter p,t,r
   5000
   3
   4
   compound amount is 5624.32
   compound interest is 624.32

 

program to find compound interest in c write a program to find compound interest program to find compound interest in c language c program to find compound interest write a c program to find compound interest how to find compound interest in c program write a program to find compound interest in c compound interest program compound interest program in c

LEAVE A REPLY

Please enter your comment!
Please enter your name here