C++ To Find Compound Interest When Principle Amount ,Rate Of Interest And Time Is Given
//C++ To Find Compound Interest When Principle Amount ,Rate Of Interest And Time Is Given
#include<iostream>
#include<math.h>
using namespace std;
int main()
{
float principal,rate,time,compound;
cout<<"Enter The Principal amount In Rs.:--";
cin>>principal;
cout<<"Enter The Rate Of Interest :--";
cin>>rate;
cout<<"Enter The Time In Years.:--";
cin>>time;
compound=principal*pow((1+rate/100),time);
cout<<"Simple Interest For Above Data :--Rs."<<compound;
return 0;
}
//C++ To Find Compound Interest When Principle Amount ,Rate Of Interest And Time Is Given
#include<iostream>
#include<math.h>
using namespace std;
int main()
{
float principal,rate,time,compound;
cout<<"Enter The Principal amount In Rs.:--";
cin>>principal;
cout<<"Enter The Rate Of Interest :--";
cin>>rate;
cout<<"Enter The Time In Years.:--";
cin>>time;
compound=principal*pow((1+rate/100),time);
cout<<"Simple Interest For Above Data :--Rs."<<compound;
return 0;
}
0 Comments