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...
''Generate numbers from -35 to 70 until the sum of the positive numbers is at least twice the sum of the negative numbers''
i need this task completed in c++, rand generates from 0 to however much you make the limit, how would i make it use negatives as well? i'm fairly new to coding.
#include <iostream>
using namespace std;
int main() {
int stadiumLength = 400;
float speed = 2.2;
int nbSeconds = 10 * 60;
int distanceRunned = speed * nbSeconds;
int nbLaps = distanceRunned / stadiumLength;
int main();
do
{
char answer;
while(true)
{
cout<<"Would you like to...
this is for a school project.
Calculate how many laps you will run in the stadium if you have to run for at least 10 minutes and how many meters you have ran. Each lap must enter a different time. The length of the stadium is 400 meters.
i also have to use do {...} while)
can someone help me...