hendyies
Coder
so i have to create a program as follows: ''15. Generate numbers between -35 and 70 until the sum of the positive numbers is at least twice the sum of the negative numbers, regardless of the sign, or absolute value. Output all generated numbers in 6 columns and results. The generated numbers can be replaced by entering numbers, but it must be checked that the entered number is within the specified range. "
--------------------------
i think i can handle some of that and make it myself, although i am extremely lost at how to make it understand when the positives are twice as much as negatives, also in the task there are 2 approaches, either i generate numbers until its positives are 2x as much as negatives, or enter them myself and make the program loop to allow me to keep entering them until its 2x as much as negatives
1. how would i get it to generate not just numbers above 0 but also negative numbers if using the generate numbers approach?
2. if im entering the numbers myself, how do i make it infinite so that theres not just 5 numbers i can enter before the program finishes, and how do i get them all to be checked for being within the -35 to 70 interval?
p.s if someone does help, can they also show an example of how to do it, because i'm quite slow with programming. much appreciation!
---------------------------
this program is due tomorrow, can someone help me? (fyi im not studying to be a programmer but someone who builds pcs and such, although programming is something im supposed to do in the first year as a side class, and i'm not too good with it.)
--------------------------
i think i can handle some of that and make it myself, although i am extremely lost at how to make it understand when the positives are twice as much as negatives, also in the task there are 2 approaches, either i generate numbers until its positives are 2x as much as negatives, or enter them myself and make the program loop to allow me to keep entering them until its 2x as much as negatives
1. how would i get it to generate not just numbers above 0 but also negative numbers if using the generate numbers approach?
2. if im entering the numbers myself, how do i make it infinite so that theres not just 5 numbers i can enter before the program finishes, and how do i get them all to be checked for being within the -35 to 70 interval?
p.s if someone does help, can they also show an example of how to do it, because i'm quite slow with programming. much appreciation!
---------------------------
this program is due tomorrow, can someone help me? (fyi im not studying to be a programmer but someone who builds pcs and such, although programming is something im supposed to do in the first year as a side class, and i'm not too good with it.)