#include <iostream>
#include <cmath>
using namespace std;
int main()
{
float p,n,r,si,ci;
cout<<"Enter the Principal amount";
cin>>p;
cout<<"Enter the number of years";
cin>>n;
cout<<"Enter the rate of interest";
cin>>r;
si=p*n*r/100
ci=p*pow((1+r/100),n)-p;
cout<<"Simple interest is "<<si;
cout<<"\n The compound interest is "<<ci;
}