Tuesday 17 October 2017

Compound Interest in c++

#include<iostream>
#include<math.h>
#include<conio.h>
using namespace std;
int main()
{
        double p, t, r, A, CI;
        cout<<"Enter Principal Amount, Time and Rate\n";
        cin>>p>>t>>r;
        A=p*pow((1+(r/100)),t);
        CI=A-p;
        cout<<"Compound Interest : "<<CI;
        getch();
        return 0;
}

Output


No comments:

Post a Comment

Python Program to find Fabonacci

fabtab={} def fabonacci(n):     fabtab[0]=0     fabtab[1]=1     for i in range(2,n+1):         fabtab[i]=fabtab[i-1]+fabtab[i-2]         ...