Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main() {
- double num;
- printf("Enter your number: \n");
- scanf("%lf", &num);
- if (num <= 0.0) {
- if(num == 0.0) {
- printf("Your number is zero \n");
- }
- else {
- printf("Your number is negative \n");
- }
- }
- else {
- printf("Your number is positive \n");
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment