hi.. this is my code:
Code:#include <iostream>
using namespace std;
int main()
{
float a,b;
char ex[]="n";
do {
cout<<"a=: " ; cin>>a;
cout<<"b=: " ; cin>>b;
cout<<"a/b= "<<a/b<<endl<<endl;
cout<<"Stop? (y/n): "; cin>>ex;
if (ex=="Y"||"y"){
return 0;
}
}while((ex!="y")||(ex!="Y"));
}
I don't know what's wrong with this program..even I press n or N it exit..I want to repeat if I press n or N.
can someone help me?