/*WAP to check no is negetive or positive*/
#include<stdio.h> #include<conio.h> int no; void negpos(); void main() { clrscr(); printf("Enter -ive or +ive number"); scanf("%d",&no); negpos(); getch(); } void negpos() { if(no<0) printf("Entered no. is negative"); else if(no>0) printf("Entered no. is positive"); else printf("Wrong entry"); }
No comments:
Post a Comment