This is your corrected code…the errors are pointed out in the code below…
//atm
#include<iostream>
using namespace std;
int main()
{
float bal; //you need to take bal as input also...it is not 120 by default..!!!
int i,j;
float rec;
/*cout<<"\n Your current balance is 120 Rupees only ! \n Enter your withdrawal Amount "; no need for such statements*/
cin>>i>>bal; //add input for balance
if(i+0.5>bal) //see if u can understand what error was here!!!
{
{
//cout<<"\n Insufficient Balance ! "; //again no need
rec=bal;
}
}
else
{
if(i%5==0)
{
//cout<<"\n Transaction successful !!"; //again no need
rec=bal-i-0.50;
}
else if(i%5!=0)
{
rec=bal;
}
}
cout<<rec<<endl; //just print the result!!!
return 0;
}
NOTE: Strictly follow the i/o format…as mentioned in the ques…no need to give out such statements unless ne such thing is mentioned in the problem statement…hope this helps…