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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!