5. C++ Program to find Compound Interest

#include<iostream> #include<math.h> using namespace std; int main() { float p,r,t,ci; cout<<“Enter Principle, Rate and Time:: “; cin>>p>>r>>t; ci=p*pow((1+r/100),t); cout<<“\nCompound Interest = “<<ci; return 0; }

1. C++ Program to calculate sum and average of two numbers

#include<iostream> using namespace std; int main() { int a, b, sum; float avg; cout<<“Enter Two Numbers”; cin>>a>>b; sum = a + b; avg = sum / 2; cout<<“Sum of two numbers :: ” <<sum<<endl; cout<<“Avg of two numbers :: “<<avg; return 0; }