Click here to Skip to main content
15,896,912 members
Articles / Programming Languages / C++

Beginner C++ Random Number Generator

Rate me:
Please Sign up or sign in to vote.
1.00/5 (2 votes)
28 Jan 2013CPOL 9K  
I am a beginner and I want to have a code with a random number generator, but my code does not follow what I would like it to follow.... PLEASE HELP! . This is what have so far... please help with any corrections, improvements, etc. #include ;#include //drand...

Alternatives

Members may post updates or alternatives to this current article in order to show different approaches or add new features.

Please Sign up or sign in to vote.
29 Jan 2013Stefan_Lang
You appear to be confused about a number of things, most related to program flow and programming logic:1. You intialize a number of char variables and never change them, but then, later, you test their value. Apparently what you intended to do is compare the user input against the values you...
Please Sign up or sign in to vote.
27 Jan 2013uddhavh
You can use rand function in c++ i = rand();

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions