Drop Down MenusCSS Drop Down MenuPure CSS Dropdown Menu

Calculate Simple interest

C++ Program to calculate Simple Interest. This program calculates the simple interest and prints the result on the compiler screen.
Three values i.e principal amount(p), interest rate(r) & time period(t) are input by the user using 'cin'. All three are taken of 'float' type .
The formula for simple interest is : p*r*t/100.The result is shown on compiler screen using 'cout'.

Source Code:-

#include<iostream.h>
#include<conio.h>

void main()
{float p,r,t,si;
 clrscr();
 cout<<"Program to calculate Simple Intrest by-Tarun Rawat\n";
 cout<<"Enter the amount : ";
 cin>>p;
 cout<<"Enter the rate of intrest in percent : ";
 cin>>r;
 cout<<"Enter the time in year : ";
 cin>>t;
 si=p*r*t/100;
 cout<<"\nSimple Interest is : "<<si;
 getch();
}

1 comment:

Blogger Widgets

Find Us On Google, Just type - way2cplusplus -

If you have any questions on implementing or understanding this C++ Program , shoot me a comment and I'll be glad to help! :) :)