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

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


Multiplying an even number of negative numbers gives an answer that is?

Multiplying an even number of negative numbers results in a positive number. This is because each pair of negative numbers multiplies to give a positive product, and with an even count, all pairs will cancel out the negativity. Therefore, the final result will be positive.


When you count quardrens you must count counterclockwise?

When counting quadrants in a Cartesian coordinate system, the convention is to start from the positive x-axis and move counterclockwise. This means the first quadrant is where both x and y are positive, the second quadrant is where x is negative and y is positive, the third quadrant has both x and y negative, and the fourth quadrant has x positive and y negative. This counterclockwise counting helps maintain consistency in mathematical analysis and graphical representation.


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.