Write a program in c to check the number is positive or negative - CodeTextPro | Free Web Tutorial

Codetextpro Provides free Web tutorial, HTML, CSS, C, C++, Java, JavaScript, PHP, MySql, Python, Program, Programming Notes, Programming Questions and more.

Programming

Friday, January 4, 2019

Write a program in c to check the number is positive or negative

C Program to Check the Number is Positive or Negative

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

Output:






No comments:

Post a Comment