#include <iostream>
#include <cmath>
int main() {
// Step 1: Declare variables
double principal, rate, time, compoundInterest;
// Step 2: Get user input
std::cout << "Enter principal amount: ";
std::cin >> principal;
std::cout << "Enter annual interest rate (in percentage): ";
std::cin >> rate;
std::cout << "Enter time in years: ";
std::cin >> time;
// Step 3: Convert interest rate to decimal and calculate compound interest
rate /= 100; // Convert percentage to decimal
compoundInterest = principal * std::pow(1 + rate, time) - principal;
// Step 4: Display the result
std::cout << "Compound Interest after " << time << " years: " << compoundInterest << std::endl;
return 0;
}