[C#] Randomly generate two numbers that user chooses and then ask the user what the answer...

60.1K

Verified Solution

Question

Programming

[C#] Randomly generate two numbers that user chooses and thenask the user what the answer is when some operator is applied. Ifuser is correct, they will be congratulated. If they are wrong,they will be given the correct answer. This should be repeatedbased on how many times is chosen by user. I have the code whichwill do the following below:

User wants to know the answer to x % y,

What is smallest value of x: (user input)

What is largest value of x: (user input)

What is smallest value of y: (user input)

What is smallest value of y: (user input)

How many times should it happen?: (user input)

What I need help with is now randomly generating the x and y theuser chooses and then using the operator that they decide whetherit be %,/,+, or - and ask them what the answer is, and determinewhether user is correct or not. For example if range of x isbetween 10 and 50 and y is 30 and 80 and the user chooses to betested on %, the program will ask the user the amount of time thatthey specified. For this example let's say it is 3. They are thengiven 3 problems featuring numbers from the range above and theyare then tested on it.

Answer & Explanation Solved by verified expert
4.5 Ratings (728 Votes)
using SystemIO using System class Program static void Main int x1 x2 y1 y2 ConsoleWriteLineWhat is smallest    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