ads

Sunday, 28 August 2016

C PROGRAM TO FIND NUMBER IS POSITIVE OR NEGATIVE

#include<stdio.h>
#include<conio.h>
void main()
{
  int num;
  printf("enter a number :");
  scanf("%d",&num);
  if(num<0)
  printf("number is negative");
  else
  printf("number is positive");
  getch();
}

No comments:

Post a Comment