Question: Consider the following pseudocode function? int f ( int n ) int x 0 int value - 1 while ( x < = n )

Consider the following pseudocode function?
int f(int n)
int x 0
int value -1
while (x <= n)
x x +5
value value +1
end while
return value
end f
if the input is a non- negative integer n, what is the output of the function ? floor and celing function denote the floor and celing function respectively?
A. floor(n/5)
B. Ceiling (n/5)

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!