Question
Java 1) In a game of guessing numbers, one person says, Im thinking of a number between 1 and 100. The other person guesses 50.
Java
1) In a game of guessing numbers, one person says, Im thinking of a number between 1 and 100. The other person guesses 50. The first person replies, No, the number is less. The second person then guesses 25, and so on, until she guesses correctly. Write a program that plays this game. The computer knows the number (a random number between 1 and 100) and the user is the guesser. At the end of the game, the computer displays the number of guesses required by the user to guess the number correctly.
2)Write a program to print the perimeter and area of rectangles using all combinations of heights and widths running from 1 foot to 10 feet in increments of 1 foot. Print the output in headed, formatted columns.
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