Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //a C program to check a given number is positive or negative or zero using function.
- #include<stdio.h>
- void num_look(int num)
- {
- if(num<0)
- {
- printf("Negative");
- }
- else if(num>0)
- {
- printf("positive");
- }
- else
- {
- printf("zero");
- }
- }
- int main()
- {
- int num;
- scanf("%d",&num);
- num_look(num);
- return 0;
- }
Add Comment
Please, Sign In to add comment