Friday, March 29, 2019

C Language Program for to Print Check The Number is Positive or Not.


BACHELOR OF COMPUTER APPLICATION (B.C.A.) FIRST SEMESTER



Here you will get simple C program 
C Language Program for Checking The Number is Positive or Not.
IT IS THE SMALLEST LOGIC USED FOR CODING OF THIS PROGRAM.
IN WHICH YOU CAN CREATE OWN VARIABLES AND FUNCTIONS.
User will input only one numbers and that is positive or negative,
then their compile will be display on screen.

The program coding is given below.
#include <stdio.h>
#include <conio.h>
void main()
{
int n;
clrscr();
printf("\nEnter the Number=");
scanf("%d",&n);
if (n>0)
{
printf("\nNumber is Positive");
}
else
{
printf("\nNumber is Negation");
}
getch();
}
Output will be given after you compile it.

No comments:

Post a Comment