#include
using namespace std;
int main()
{
bool isDigit(int isd);
int unknowNUM;
cout<<"please input one integer number:"<
if(isDigit(unknowNUM))
{
//Things to do...
}
else
{
cout<<"you just input not digit!"<
return 0;
}
bool isDigit(int isd)
{
if (/*if "isd" is digit */) return true;
else if(/*if "isd" no digit*/)return false;
}
thanks

VulpesPosted Apr 26, 2012, 10:13 AM
Ken HPosted Apr 26, 2012, 11:24 PM
Ken HPosted Apr 26, 2012, 9:50 AM
such as:<,>,<=,>=,!=,==
assume unknowNUM the value is 100
if(isDigit(unknowNUM))
{
if(unknowNUM>100)
{
//do...
}
else if(unknowNUM<150)
{
//do...
}
}
thanks
Ken HPosted Apr 26, 2012, 8:53 AM
thank for Mahesh Chand,Vulpes.
VulpesPosted Apr 26, 2012, 8:44 AM
Mahesh ChandPosted Apr 26, 2012, 6:43 AM