Program to calculate Simple Interest in C++
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
float p,n,r,si;
cout<<"\nEnter Principal Amount :: ";
cin>>p;
cout<<"\nEnter No. of Years :: ";
cin>>n;
cout<<"\nEnter Rate of Interest :: ";
cin>>r;
si=(p*n*r)/100;
cout<<"\n\tSimple Interest is Rs. "<<si<<"/-";
getch();
}
OUTPUT::
Enter Principal Amount :: 1000
Enter No. of Years :: 3
Enter Rate of Interest :: 5
Simple Interest is Rs. 150/-