Question: // find the smallest integer whose square is greater than y int number,test,y; test = 0; for (number = 1; test
// find the smallest integer whose square is greater than y
int number,test,y;
test = 0;
for (number = 1; test <= y; number++)
test = number * number;
System.out.println(number-1 + " is the smallest");
(please try y = 4, y = 5, y = 26)
what is the output and why.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
