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


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.


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);


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 what connotation is that positive or negative?

neutral


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.

Trending Questions
What is chemical etching in PCB manufacturing process? What is the formula for calculating transformer oil in kg to liter? What is difference between von mises and principle stress? Why are the pneumatic transmitters are still in use? What results from the Zonosemata experiment support the sub-hypothesis that wing waving alone reduces predation by jumping spiders? Is aerospace engineering invention or innovation? What do you understand by canal alignment? Are tools like Eclipse different languages from Java? What is Solkar Current Differential? What is the purpose of NoMatchException handling method in java? Can this integer 6546454564564564564564564564565645645645645645645645645645645645645645645645 be stored in Java exactly if yes then please state the data type? What circumstances is it possible for the rms current drawn from a certain source to have the same magnitude when an inductance is connected in series with a given impedance? Why do large corporations break themselves into smaller business units or departments? Can you use three phase power for a dwelling unit service? What types of robots replace human jobs? What are some pascal inventions? PEACE is a pneumonic associated with which step in the Coast Guards Operational Risk Management (ORM) process? Generally an electronically controlled diesel engine is fitted with an air flow sensor what is the purpose of measuring engine air consumption in this application? Can concrete block get wet? How much cement to gravel mix?