➽ Program:-

#include<iostream>

#include<cmath>

using namespace std;

int main()

{

       float principal_amount, rate, time, compound_interest;

       cout<<"Enter Principal Amount: ";

       cin>>principal_amount;

      

       cout<<"Enter time(in years): ";

       cin>>time;

      

       cout<<"Enter Rate: ";

       cin>>rate;

      

       compound_interest = principal_amount * (pow((1 + rate / 100), time));

      

       cout<<"Compound Interest = " << compound_interest;

       return 0;

}

➽ Output:-

Enter Principal Amount: 1700
Enter time(in years): 3
Enter Rate: 6.7
Compound Interest = 2065.11