answersLogoWhite

0


Best Answer
  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

11y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

11y ago

Well my dear, if i enter a Floating Value :D your program will terminate ! immediately.
and if i input a alphabet or a Special symbol.. then again the program will stop abnormally..

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Write a c program to find positive and negative count?
Write your answer...
Submit
Still have questions?
magnify glass
imp
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.


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.


What is a positive integer a negative integer?

Start at 0 and go in both the negative and positive directions. So in the positive one we have 0,1,2,3,4,5,6,7,8,9,19, and keep going forever. Those are the non-negative integers. If we get rid of the o and leave all the others, we have the positive integers. Now take each positive integer, 1,2,3,4 etc and make it a negative number, so we have -1,-2,-3, etc, those are the negative integers. Or we can start at -1 and count toward negative infinity by going -1, -2,-3, -4, .... forever and those are the negative integers.