Ken H

Ken H

  • NA
  • 646
  • 356k

Determine whether to digital in c++

Apr 26 2012 4:52 AM
hi all,
   

#include<iostream>
using namespace std;
int main()
{
  bool isDigit(int isd);
  int unknowNUM;
  cout<<"please input one integer number:"<<endl;
  cin>>unknowNUM;
  if(isDigit(unknowNUM))
  {
    //Things to do...

  }
  else
   {
     cout<<"you just input not digit!"<<endl;
   }
 
  return 0;
}
bool isDigit(int isd)
{
   if (/*if "isd" is digit */) return true;
   else if(/*if "isd" no digit*/)return false;
}


thanks

Answers (6)