#include<stdio.h>
#include<conio.h>
void main()
{
// print no. is positive or negative
int a;
clrscr();
printf("enter number::\n");
scanf("%d",&a);
if (a>0)
{
printf("no. is positive\n");
}
else
{
printf("no. is negative\n");
}
getch();
}
out put:-
enter number
-5
no. is negative
#include<conio.h>
void main()
{
// print no. is positive or negative
int a;
clrscr();
printf("enter number::\n");
scanf("%d",&a);
if (a>0)
{
printf("no. is positive\n");
}
else
{
printf("no. is negative\n");
}
getch();
}
out put:-
enter number
-5
no. is negative
nice blog
ReplyDelete