Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Recent content by hendyies

  1. hendyies

    Answered generate random negative and positive numbers

    nevermind i got it!!!!!!!!!!!!!!!
  2. hendyies

    Answered generate random negative and positive numbers

    error: invalid operands of types ‘int() throw ()’ and ‘int’ to binary ‘operator%’ nmbr = (rand % 70) - 35;
  3. hendyies

    C++ code that would calculate when the positives are twice as much as the negatives

    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...
  4. hendyies

    Answered generate random negative and positive numbers

    ''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.
  5. hendyies

    C++ help me code something very simple? im a beginner

    NEVERMIND I FIXED IT, IT WAS SUPPOSED TO BE DEFINED OUTSIDE OF THE BLOCKS!!!!!
  6. hendyies

    C++ help me code something very simple? im a beginner

    #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...
  7. hendyies

    C++ help me code something very simple? im a beginner

    i appreaciate the help, ill try to do my best, thank you!
  8. hendyies

    C++ help me code something very simple? im a beginner

    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...
Back
Top Bottom