Write a Program to input a number and check number is positive or not.

In this program we input a number and check number is positive or not. If number is greater than Zero, then number is positive.

#include<stdio.h>
#include<conio.h>
void main()
{
int n;
clrscr();
printf("Enter a number=");
scanf("%d",&n);
if(n>0)
printf("Positive number");
else
printf("Not positive number");
getch();
}







Follow for recently updates. 

Comments

Popular posts from this blog

Write a program to input age of any person and check he is eligible for voting or not.

Write a program to input two digit number and check number is palindrome or not.

Write a program to input speed of Royal Enfield and check it's running at economic speed or not.