Computer Science, asked by anso9589, 10 months ago

C++ program to calculate simple interest , if the time is less than 5 years then the rate of interest will be 6% otherwise it will be 6.5%.

Answers

Answered by badboy12317
6

Explanation:

#include<iostream.h>

#include<conio.h>

main()

{float p,t,si;

cout<<"Enter principal amount ";

cin>>p;

cout<<endl<<"Enter time (yrs) ";

cin>>t;

if(t>10)

{ si=p*8*t;

cout<<endl<<"Simple interest= "<<si;

}

else

{ si=p*12*t;

cout<<endl<<"Simple interest= "<<si;

}

getch();

return 0;

}

Read more on Brainly.in - https://brainly.in/question/660570#readmore

Similar questions