answersLogoWhite

0

  1. # include
  2. # include
  3. void main()
  4. {
  5. int a[20], i, n ;
  6. clrscr() ;
  7. printf("Enter the limit : ") ;
  8. scanf("%d", &n) ;
  9. printf("Enter the elements") ;
  10. for(i = 0 ; i < =n ; i++)
  11. scanf("%d", &a[i]) ;
  12. printf("The positive elements are") ;
  13. printf("the negative elements are);
  14. for(i = 0 ; i < n ; i++)
  15. {
  16. if(a[i] > 0)
  17. printf("%d", a[i]) ;
  18. if(a[i]<0
  19. printf("%d",a[i]);
  20. }
  21. getch() ;
  22. }
User Avatar

Wiki User

12y ago

What else can I help you with?

Related Questions

Does a negative number times a negative number equal a positive number?

Yes, as long as you don't count zero as either positive or negative.


What will be the sign of the product if we multiply 90 negative integers and 9 positive integers?

The product of any number of negative integers is positive if there is an even count of them, and negative if there is an odd count. Since 90 is an even number, the product of the 90 negative integers will be positive. When this positive product is multiplied by the 9 positive integers, the overall product remains positive. Therefore, the sign of the product will be positive.


Draw a flow-chart to count how many of 10 input numbers are positive negative and zero?

draw a flow chart to input ten number and count the positive negative and zero


Are rational numbers always integers?

Most of the time yes, positive or negative whole numbers count as rational numbers. So do positive or negative fractions.


To add a negative number in which direction do you count on the number line?

Adding a negative number is the equivalent to moving to the left on a negative-positive number line.


How can you find the sign of the product of two or more rational numbers?

Count the number of negative values. If that number is even, the answer is positive and if it is odd, the answer is negative.


How many factor pairs can you find for 12 if factors can be positive negative zero?

12 has three factor pairs, six if you count their negative counterparts.


What is the rule for multiplying integers with different signs?

Multiply two integers disregarding the signs. Then if the signs are the same, the answer is positive and if the signs are different, the answer is negative. Alternatively, if you are multiplying together a whole bunch of numbers, first find the product while ignoring the signs. Then count all the negative numbers. If the count is even, the answer is positive and if it is odd, the answer is negative.


How do you write a program in c that will count from 1 to 10 and its square for each count?

int i; for (i=1; i&lt;=10; i++) printf ("%d %d\n", i, i*i);


3 mo old baby has a low blood count mother is negative blood and father positive can this be the cause of the low blood count?

This can be a cause if the baby had a low blood count from birth or very shortly after, especially if this is not the first pregnancy. Hemolytic disease of the newborn can be caused by the mother's antibodies attacking the baby's red blood cells if the baby if Rh positive and the mother is Rh negative. The antibodies get into the baby before birth, however, so if the baby developed a low blood count at 3 months it would not be because of the negative/positive blood type.


What does a negative minus a positive equal?

A negative subracting a positive will end up as a negative. Explanation: If you have 3 negatives, you cannnot take 3 positives from it, so you need to add 3 zeros, (which are both negative and positive), to the negative side. The number zero means nothing, so it will not alter the question. KEY _ =negative + =positive _+ =zero _ _ _ needs _+ _+ _+ to subract + + + Once you take the 3 positives from the negative side, you will be left with 6 negatives _ _ _ _+_+_+ minus + + + leaves you with _ _ _ _ _ _ *NOTE* You may be thinking, "But the zero did count! It's symbol left a mark on the answer!". Wrong. Zero in math means nothing, and that is how it will stay. You only needed it because it had the positive sign you were looking for. But because it is both positive and negative, you will be left with a negative when you take away the positive, and a positive when you take away the negative. This is why a positive subracting a negative will equal a negative.


How can you graph and locate points that contain negative numbers in a coordinate plane?

To,plota point, start at the origin and count along the x axis until you reach the x coordinate, count right for positive numbers, left for negative.