Computer Science, asked by vidhya2228, 1 year ago

Write a c pgm to check the given no is negative?

Answers

Answered by BrainlyHulk
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 ();
}

vidhya2228: scanf %d means what
BrainlyHulk: it is to input the integer number to 'a'
Similar questions