Posts
 
Reputation
Joined
Last Seen
Strength to Increase Rep
+0
Strength to Decrease Rep
-0
0% Quality Score
Upvotes Received
0
Posts with Upvotes
0
Upvoting Members
0
Downvotes Received
1
Posts with Downvotes
1
Downvoting Members
1
1 Commented Post
0 Endorsements
Ranked #72.8K
~469 People Reached
This member's community profile is only visible to logged in members until they have earned 15 reputation points.
Favorite Forums
Favorite Tags
c++ x 2

1 Posted Topic

Member Avatar for Rickenbacker360

Yeah, you've told it to Print H if 1, else print t. Therefore If the number is 1 (and only 1) it will be H. Randomly generated numbers are not whole numbers. You will get 0.45623. To fix it, it should be something like this: if (rand()<0.5); print "h", else …

Member Avatar for Somegamer
0
469

The End.