Write a program to enter any 20 numbers, which includes negative numbers also | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
- 1

Write a program to enter any 20 numbers, which includes negative numbers also

Your program shall terminate and come out of the program, once the user had entered the number Zero. Your program should display how many Positive and Negative numbers the user had entered after encountering Zero. This program is to be written using functions.

29th May 2021, 7:02 AM
Abhijeet Minz
2 Réponses
+ 2
PLEASE SEND YOUR CODE!
29th May 2021, 7:18 AM
Eashan Morajkar
Eashan Morajkar - avatar
0
Abhijeet Minz "Program shall terminate after entering 0" so how you will count positive and negative number after encountering 0? I think there should be before encountering 0. Hint : You can push elements in a global array and stop pushing elements when user enter 0. Now you can count using that array.
29th May 2021, 8:15 AM
A͢J
A͢J - avatar