C++ program to input principal amount and time (in years) .If time is

calculate simple interest with

Here I used formula .... Simple Interest =(P*R*T)/100

lets start....

//start

#include<iostream.h>

#include<conio.h>

#include<math.h>

void main()

{ clrscr();

float p,t,si;

cout<<"Enter Principal and Time(year) :";

cin>>p>>t;

if (t>=10.0)

{

si=8.0*(p*t)/100.0;

cout<<"Simple Interest is :"<<si;

}

else

{

si=12.0*(p*t)/100.0;

cout<<"Simple interest is :"<<si;

}

getch();

}

//end

Press Alt+F9 to compile program.

Then Press Ctrl+F9 to run program.

If you need help ,comment below.

please

Thank you

**more than 10 years**,calculate simple interest with

**rate 8%**otherwise calculate it**with 12%**per annum.Here I used formula .... Simple Interest =(P*R*T)/100

lets start....

//start

#include<iostream.h>

#include<conio.h>

#include<math.h>

void main()

{ clrscr();

float p,t,si;

cout<<"Enter Principal and Time(year) :";

cin>>p>>t;

if (t>=10.0)

{

si=8.0*(p*t)/100.0;

cout<<"Simple Interest is :"<<si;

}

else

{

si=12.0*(p*t)/100.0;

cout<<"Simple interest is :"<<si;

}

getch();

}

//end

Press Alt+F9 to compile program.

Then Press Ctrl+F9 to run program.

If you need help ,comment below.

please

__share this blog to your friends____Subscribe us for Future posts (My C Plus Plus)__

Thank you

EmoticonEmoticon