#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();
}
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.
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;
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?
WRITE A PROGRAM TO CONVERT A 2-DIGIT bcd NUMBER INTO HEXADECIMAL
Yes. The letter i denotes the value of the "positive square root" of -1. So i² = -1. But also (-i)² = -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.
write a c++program by using if statement to read a number and check whether it is positive or negative
if it is not like that then the answer wont be write. Well, It is to be known that two negatives make a positive.
#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; }
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.
* 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.
if p represents your positive number, and n represents all of your negative numbers, then: |∑n| < p
if p represents your positive number, and n represents all of your negative numbers, then: |∑n| < p
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.
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);
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)
neutral
-- 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.)