Computer Science, asked by sonireena262, 7 months ago

a) Given two public functions are the parts of some class
Answer the questions that follow. Show Dry run or working:
int pros_number (int x,int y)
{
int g=x%3;
y/=2;
double k=Math pow((g+y), 2);
if (k>(g+y))
return (int) k;
else return(int) (k+2);
}​

Answers

Answered by Anonymous
1

Answer:

Consider the following function

f <- function(x) {

g <- function(y) {

y + z

}

z <- 4

x + g(x)

}

If I then run in R

z <- 10

f(3)

Similar questions