I've been severely troubled on putting a cout whereas will tell me "Error" if i didnt put an integer and put a symbol or alphabet instead
here's my code..
#include <iostream.h>
#include <conio.h>
int larger()
{ int x,y,z;
cout<<"enter 1st integer : ";
cin>>x;
cout<<"enter 2nd integer : ";
cin>>y;
cout<<"enter 3rd integer : ";
cin>>z;
if ((z>y)||(z>x))
cout<<z<<" is larger than "<<y<<" and "<<x<<"\n";
else if ((x>z)||(x>y))
cout<<x<<" is larger than "<<z<<" and "<<y<<"\n";
else ((y>x)||(y>z))
cout<<y<<" is larger than "<<x<<" and "<<z<<"\n";
else
cout<<"Error";
}
int main()
{ clrscr();
larger();
getch();
return 0;
}
been tinkering this for half an hour now.. i just gave up :'(