Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please code and save in a txt or rtf file. Upload your solutions. Code in either Visual Studio or Xcode and save to Notepad (or
Please code and save in a txt or rtf file. Upload your solutions. Code in either Visual Studio or Xcode and save to Notepad (or the like, but not Word). 1. Create a random number between 1 and 100 . If it is less than or equal to 50 output "you chose a number less than 50. " if it is more than 50 , output "you chose a number more than 50." 2. Create a random number between 1 and 6 . If it is even, output to the console "it is even" if it is even; otherwise, output "it is odd". 3. Create 2 random numbers between 1 and 6 . If when the two numbers are added together their sum is less than 5 or greater than or equal to12, output to the console: "you win". If it is not, output "You lose" 4. Create a random number between 50 and 100. If the number is between 50-70 output "it's between 50 and 70". 5. Ask the user for an ' a ' or ' b '. If they say a, then you output b. If they say b, then you output a. 6. Ask the user for the length and width of two rectangles. Tell the user the area of the rectangle with the greater area
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started