answersLogoWhite

0


Best Answer

#include<stdio.h>

#include<conio.h>

void main()

{

int no;

clrscr();

printf("Enter a Number:");

scanf("%d",&no);

if(no>0)

printf("Your Number is Positive");

else

printf("Your number is Negative");

getch();

}

User Avatar

Wiki User

11y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Write a c program to find number is positive or negative?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Basic Math

What are the factor pairs of NEGATIVE numbers?

So, when two negative numbers multiply, their product is a positive number (Remember the rule: minus x minus = plus). So, both the numbers in the factor pair should be either negative or positive to give a positive number as a product. For example: (-3 and -6) and (-2 and -9) form factor pairs for 18.


How do you write a program to print Inverse number in PHP?

There are two types of inverse numbers in this context: additive and multiplicative. An additive inverse number is a number that's had its sign flipped: positive becomes negative, and negative becomes positive. The PHP code for this would be: $result=-$number; A multiplicative inverse number is a number that's been divided into 1. So 5 becomes 1/5, and 1/5 becomes 1/1/5, or 5. The PHP code for this would be: $result=1/$number;


Input a number and find whether it is positive or negative?

Placing a question mark at the end of a statement does not make it a sensible question. Try to use a whole sentence to describe what it is that you want answered.Yes, it is possible to input a number and find whether it is positive or negative. Yes, it is possible to write an algorithm to do that. But what is it that you want?


2 Write a program to convert a 2-digit BCD number into hexadecimal?

WRITE A PROGRAM TO CONVERT A 2-DIGIT bcd NUMBER INTO HEXADECIMAL


The square root of a negative value is called an imaginary or number?

Yes. The letter i denotes the value of the "positive square root" of -1. So i&sup2; = -1. But also (-i)&sup2; = -1 as well. Remember that for every number there is a "positive" and "negative" square root. So if you want the square root of -4, you can do this: -4 = (-1)(4). So sqrt(-4) = sqrt[(-1)(4)] = sqrt(-1)*sqrt(4) = i*2 or -i*2. We usually write these as 2i and -2i.

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


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.


Write a program to check a number is negative or positive?

#include&lt;stdio.h&gt; int main() { int num; do { scanf ("Enter a number (0 to exit): %d", num); if (num&gt;0) printf ("The number is positive.\n"); else if (num&lt;0) printf ("The number is negative.\n"); else printf ("The number is zero, neither positive nor negative\n"); } while (num); return 0; }


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


How do you add positive and negative fractions?

-- Remember which one was positive and which was negative, then forget about the signs.-- Write down the one that was positive-- Subtract from it the one that was negative(Notice that if the negative one was bigger, then the answer will be negative.)