Saturday, 11 August 2012

Write a program to find out whether number is Negative or positive.


Open TC.exe
Click on File and then Click on New.
then type.

#include<stdio.h>
#include<conio.h>
void main ()
{
clrscr ();
int n ;
printf("Enter any Number");
scanf("%d",&n);
if (n>0)
printf("%d is Positive");
else
printf("%d is Negative");
getch();
}

cprogramminglanguagehistory.blogspot.com
cprogramminglanguagehistory.blogspot.com
result:
cprogramminglanguagehistory.blogspot.com
cprogramminglanguagehistory.blogspot.com

No comments:

Post a Comment