|
From: sam R. <as...@ya...> - 2008-03-28 01:54:59
|
This code was working fine two days ago. But today it is acting weird. It runs fine but the result is wrong. It is suppose to give me a message whenever I enter character instead of number.
=====================================================
#include<iostream>
#include<cctype>
using namespace std;
int main()
{ int a,b,c;
cout << "Enter 3 integers a,b,c \n";
cin >> a>>b>>c;
cout <<"\n";
if(a|b|c == char())
{
cout <<"Please don't enter characters. Enter numbers only.\n";
}
else
{ if(a!=b && b!=c)
cout << "Scalene\n";
else if (a==b && a!=c)
cout <<"Isosceles\n";
else if (a==b && a==c)
cout <<"Equilateral\n";
}
system("pause");
return 0;
}
========================================================
---------------------------------
Never miss a thing. Make Yahoo your homepage. |