Home Article Write a program to check whether a number is positive or negative. Write a program to check whether a number is positive or negative. Admin 9:33 PM 0 comments Share: Facebook Twitter Google+ Pinterest Whatsapp Problem Name: Write a program to check whether a number is positive or negative. Source Code: #include<stdio.h> main() { int a; printf("Enter a number"); scanf("%d",&a); if(a>=0) printf("%d is positive",a); else printf("%d is nagative",a); } Output:
No comments