answersLogoWhite

0

#include<stdio.h>

int main() {

int num;

do {

scanf ("Enter a number (0 to exit): %d", num);

if (num>0)

printf ("The number is positive.\n");

else if (num<0)

printf ("The number is negative.\n");

else

printf ("The number is zero, neither positive nor negative\n");

} while (num);

return 0;

}

User Avatar

Wiki User

9y ago

What else can I help you with?

Related Questions

Write a program By using if else statement to read a number and check whether it is positive or negative?

write a c++program by using if statement to read a number and check whether it is positive or negative


Write a c program to find number is positive or negative?

#include&lt;stdio.h&gt; #include&lt;conio.h&gt; void main() { int no; clrscr(); printf("Enter a Number:"); scanf("%d",&amp;no); if(no&gt;0) printf("Your Number is Positive"); else printf("Your number is Negative"); getch(); }


Why a negative number times a negative number equal a positive number?

if it is not like that then the answer wont be write. Well, It is to be known that two negatives make a positive.


What does negative plus positive equal to?

In math when you are given a negative and a positive number, you should write down the sign of the greatest number and subtract the smaller number from the greatest number. In the problem 3 - 9, three is the positive number, and nine is the negative number. This means you should write down the negative number's sign and subtract 3 from 9, and your answer should be -6.


Why does the expression -a does not always represent a negative number?

* If "a" is positive, "-a" is negative.* If "a" is negative, "-a" is positive. * If "a" is zero, "-a" is zero. If you want to force a negative number, you can write -|a|, i.e., the negative of the absolute value.


How do you write a equation when the sum of a positive number and several negative numbers will be positive?

if p represents your positive number, and n represents all of your negative numbers, then: |&sum;n| &lt; p


How would you write out a conditions when the sum of a positive number and several negative numbers will be positive?

if p represents your positive number, and n represents all of your negative numbers, then: |&sum;n| &lt; p


Write a program for checking positive or negative number?

In Java:if (myNumber > 0) System.out.println("The number is positive);else if (myNumber < 0) System.out.println("The number is negative);else System.out.println("The number is equal to zero);In Java:if (myNumber > 0) System.out.println("The number is positive);else if (myNumber < 0) System.out.println("The number is negative);else System.out.println("The number is equal to zero);In Java:if (myNumber > 0) System.out.println("The number is positive);else if (myNumber < 0) System.out.println("The number is negative);else System.out.println("The number is equal to zero);In Java:if (myNumber > 0) System.out.println("The number is positive);else if (myNumber < 0) System.out.println("The number is negative);else System.out.println("The number is equal to zero);


What can you say about positive integers and negative integers?

Positive numbers are any numbers greater than zero.For example: 1, 2.9, 3.14159, 40000, and 0.0005.Negative numbers are any number less than zero.For Example: -1, -2.9, -3.14159, -40000, and -0.0005.For each positive number, there is a negative number that is its opposite. We write the opposite of a positive number with a negative or minus sign in front of the number, and call these numbers negative numbers.We do not consider zero to be a positive or negative number.The sum of any number and its (negative) opposite is 0.The sign of a number refers to whether the number is positive or negative.For example: The sign of -3.2 is negative, and the sign of 442 is positive.We may also write positive and negative numbers as fractions or mixed numbers.


Flowchart to check whether an integer is positive or negative?

I'll write it as pseudocode; you can easily convert it to a flowchart. If your number is more than 0 (Your number is positive) else if your number is less than 0 (your number is negative) else (your number is equal to zero)


Write a program which will rise any number X to a positive power nobtain values of X and n from user?

user-generated content: disclaimer report abuse = Write a program which will rise any number X to a positive power nobtain values of X and n from user? =


What is a number and its opposite called?

For each positive number, there is a negative number that is its opposite. We write the opposite of a positive number with a negative or minus sign in front.The opposite of a number is also called its additive inverse.For example, 5 is the additive inverse of -5 and -5 is the additive inverse of 5.