Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
B

bobski2200

@bobski2200
About
Posts
2
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • C++ Random Question
    B bobski2200

    Thank you for the tips guys i will try them out i just have to figure a way fo getting it to give the user 8 trys max. Thanks for not talking to clever for me lol :) This Better ******* Work!

    C / C++ / MFC c++ game-dev help question lounge

  • C++ Random Question
    B bobski2200

    :)First off apols if this is in the wrong section i am new here I have this code now and try as i may i cannot get the random number to change it is always 41 when it should be between 0-100. I am not that good at C++ and would appreciate any help can i please reinforce the basis that my knowledge is very basic thanks for any help guys. #include #include int main(void) { // declare our variables // Guess entered by user and random number int guess, random; random = rand(); // Creates a loop for the main program do { cout << "My High-Low game!\n\n"; cout << "Please enter a number between 0 and 100: "; cin >> guess; cout << "You entered " << guess << "!\n"; if (guess == random) { cout << "Correct guess, the answer is " << guess << "!\n"; } else { if (guess > random) { cout << "Your guess is too high!\n"; } else { cout << "Your guess is too low!\n"; } } // Terminating condition for the loop // Program stops when the guess equals the random number } while(guess!=random); // This command pauses the program system("PAUSE"); return 0; } This Better ******* Work!

    C / C++ / MFC c++ game-dev help question lounge
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups