Question
Read n numbers. Count the number of negative numbers, positive numbers and zeros in the list.
Answer :
Word Count : 214
___ __________ _________ ____ ___ _____ ________ __________.
_________ _________ __________ _________ _________ ______ _____ _______.
________ ___ _____ ____ ___ ____ _____ ______ ________ _______ __________ __________.
______ ________ __________ _______ _______ _____ ______.
___ ____ ______ _______ _____ __________ ________.
_____ __________ _______ __________ ____ _____ ___.
____ ________ ___ ____ ______ __________ ___ ________ ______ ______ _____ ____.
__________ _____ ___ __________ _______ ____ _________ _____ _______ __________ ________ __________.
___ ________ ______ ______ _________ _____ ___ _________ __________.
__________ _________ __________ _____ ___ __________ ____ ____ ________ _________ ________ ______.
________ ____ _____ _____ __________ __________ _______ ______ ______.
_____ ________ ___ _____ __________ ______ ______.
______ ___ ______ _________ ________ ___ _____ __________ ____ ___ ________.
________ _____ ______ _________ _______ ______ ___.
_________ ____ ____ _____.
Skip in 10
To solve the problem of counting negative numbers, positive numbers, and zeros in a list of `n` numbers, we start by taking input for the total number of elements `n`. Then, we create three counters initialized to zero: one for positive numbers, one for negative numbers, and one for zeros. Using a loop, we read each number one by one. For each number, we check its value: if it is greater than zero,
____ ______ ________ __________ _____ ________ ________ ______ ___.___ __________ _________ ____ ___ _____ ________ __________.
_________ _________ __________ _________ _________ ______ _____ _______.
________ ___ _____ ____ ___ ____ _____ ______ ________ _______ __________ __________.
______ ________ __________ _______ _______ _____ ______.
___ ____ ______ _______ _____ __________ ________.
_____ __________ _______ __________ ____ _____ ___.
____ ________ ___ ____ ______ __________ ___ ________ ______ ______ _____ ____.
__________ _____ ___ __________ _______ ____ _________ _____ _______ __________ ________ __________.
___ ________ ______ ______ _________ _____ ___ _________ __________.
__________ _________ __________ _____ ___ __________ ____ ____ ________ _________ ________ ______.
________ ____ _____ _____ __________ __________ _______ ______ ______.
_____ ________ ___ _____ __________ ______ ______.
______ ___ ______ _________ ________ ___ _____ __________ ____ ___ ________.
________ _____ ______ _________ _______ ______ ___.
_________ ____ ____ _____.
IGNOU ACADEMY
Your IGNOU journey, made easier.
- Solved Assignments
- Study Notes
- Guess Papers
- Question Papers
Continue Reading — It's Free
Sign in with Google to unlock more of this answer.
✓ Free access
✓ Unlock up to 60% of the answer
✓ No payment required
✓ Unlock up to 60% of the answer
✓ No payment required
Quick Google sign-in. No separate registration form.