#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

VulpesRank #55 · 29.2K reputationPosted Apr 26, 2012, 6:13 AM EDT
Mahesh ChandRank #1 · 393.4K reputationPosted Apr 26, 2012, 2:43 AM EDT
VulpesRank #55 · 29.2K reputationPosted Apr 26, 2012, 4:44 AM EDT
Ken HRank #2,315 · 610 reputationPosted Apr 26, 2012, 4:53 AM EDT
thank for Mahesh Chand,Vulpes.
Ken HRank #2,315 · 610 reputationPosted Apr 26, 2012, 5:50 AM EDT
such as:<,>,<=,>=,!=,==
assume unknowNUM the value is 100
if(isDigit(unknowNUM))
{
if(unknowNUM>100)
{
//do...
}
else if(unknowNUM<150)
{
//do...
}
}
thanks
Ken HRank #2,315 · 610 reputationPosted Apr 26, 2012, 7:24 PM EDT
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questionsTop experts