1. make a c++ program that generates a random number 1to 100 using rand(). user gets 5 attempts stop...

50.1K

Verified Solution

Question

Programming

1.make a c++ program that generates a random number 1to 100 usingrand().
user gets 5 attempts
stop program when they get it right
find out which guess was the closest to the actual number andprint out that they have to run the difference in miles for example(50-30)=20 miles
do not use arrays!
very quick upvote for good response

Answer & Explanation Solved by verified expert
3.8 Ratings (581 Votes)
include using namespace stdint main srand timeNULL initializing random number generator    See Answer
Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students