I am new to C++, was writing a simple program when this Statement error pops up.
The code of my program is:-
P.S:-
1. It shows statement missing after the last bracket("}") sometimes.
2. Whenever i run some programme, It automatically closes as soon as I enter the values of , say, a and b.
3. After I rerun a program, the values of the previous time i ran a program also shows up and i dont want it.
Please Explain all of it
Thanks.
Regards, Purnaabh
The code of my program is:-
Code:
#include<iostream.h>
int main ()
{
int P, R, T, I ;
cout<<"Enter The Principle(In Rupees):";
cin>>P;
cout<<" The Rate is:";
cin>>R;
cout<<"The time (In Years)is :";
cin>>T;
I=(P*R*T)/100
cout<<"The Simpe Interst Is:"<<I;
return 0;
}
1. It shows statement missing after the last bracket("}") sometimes.
2. Whenever i run some programme, It automatically closes as soon as I enter the values of , say, a and b.
3. After I rerun a program, the values of the previous time i ran a program also shows up and i dont want it.
Please Explain all of it
Thanks.
Regards, Purnaabh

Comment