Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Write a program to test whether a no. is positive,
- negative, or equal to zero. */
- #include<conio.h>
- #include<stdio.h>
- void main()
- {
- int a;
- clrscr();
- fflush(stdin);
- printf("\n Enter Value : ");
- scanf("%d", &a);
- if(a==0)
- {
- printf(" You Enter Value is 0");
- }
- else if (a > 0)
- {
- printf(" Enter Value is Positive");
- }
- else
- {
- printf(" Enter Value is Negative");
- }
- getch();
- }
Add Comment
Please, Sign In to add comment