Write a c pgm to check the given no is negative?
Answers
Answered by
4
#include <stdio.h>
void main()
{
int a ;
printf ("Enter a number :") ;
scanf ("%d" &a );
if ( a < 0 )
{
printf ("it is a negative number " );
}
else
{
printf("it is positive " );
}
getch ();
}
void main()
{
int a ;
printf ("Enter a number :") ;
scanf ("%d" &a );
if ( a < 0 )
{
printf ("it is a negative number " );
}
else
{
printf("it is positive " );
}
getch ();
}
vidhya2228:
scanf %d means what
Similar questions