I have to make a programme in c++ in which a number is chosen randomly between 1 and 100. We type a number.
If it is less than the random no., it should display smaller;and if larger then bigger;if correct no. then the winner
Only 10 chances
Pleez help me
if u dont understand it IM me at aayushahuja2@yahoo.co.in
C++ help!!!!!!!!!!!!!?
int r=(rand()*100);
int input;
cin %26gt;%26gt; input;
if(input==r)
cout %26lt;%26lt; "You are winner" %26lt;%26lt; endl;
if %26lt;
cout %26lt;%26lt; "less" %26lt;%26lt; endl;
if %26gt;
cout %26lt;%26lt; "more"%26lt;%26lt;endl;
Reply:Enjoy doing your homework! Good luck getting someone to write it for you....!
survey results
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment