1. Write a program that asks the user to enter an integer from 1 to 100 and then “guesses” at that integer by generating random integers until one matches the user’s integer. Display both the guesses...


1. Write a program that asks the user to enter an integer from 1 to 100 and then “guesses” at that integer by generating random integers until one matches the user’s integer. Display both the guesses and the number of guesses the program takes to get the correct value.


2. A square number, or sometimes a perfect square, is an integer that can be written as the square of an integer. For example 16 is a square number, since it is the square of 4, that is, 42 , or 4 x 4. Write a program that tests whether any positive integer entered by the user is a square number.



May 18, 2022
SOLUTION.PDF

Get Answer To This Question

Submit New Assignment

Copy and Paste Your Assignment Here