Invaild Output Error
<p>I need to add two numbers. The constraint here is that i also have to check that the input is not an alphabet. I have used isdigit() function to check for this. But when i run the code it executes the else block even if the input is number. </p>

<pre><code>#include&lt;stdio.h&gt;
#include&lt;conio.h&gt;
#include&lt;ctype.h&gt;
void main()
{
int a,b,c;
clrscr();
scanf("%d\n",&amp;a);
scanf("%d",&amp;b);
c=a+b;
if(isdigit(a) &amp;&amp; isdigit(b))
{
printf("%d",c);
printf("\n");
}
else
{
printf("Inavild Output");
}
getch();
}
</code></pre>