title: isdigit() isn't working in a simple program?
body: <pre><code>#include&lt;iostream.h&gt;
  #include&lt;conio.h&gt;
  #include&lt;ctype.h&gt;
  void main()
  {
      clrscr();
      int a;
      cout&lt;&lt;"Enter a digit";
      cin&gt;&gt;a;
      if(isdigit(a))
      {
           cout&lt;&lt;"You have entered a digit";
      }
      else
      {
           cout&lt;&lt;"Not a digit";
      }
      getch();
  }
  </code></pre>
  
  <p>The code shows no errors, but every time I enter a digit it displays "Not a digit". </p>