Computer Science, asked by chetanac, 9 months ago

Void f( int x,int y){
while (x<y){
printf("%d",y-x);
x= x+1;
y= y-1;
}
}
what output for f(3,6)​

Answers

Answered by codiepienagoya
14

The output of the given method is "31".

Explanation:

  • In the given question a method "f" is declared, in which two integer variables "x and y" passed as a parameter, inside the method a while loop is declared.
  • In the loop, a condition is declared that checks value x is less than y, it decreases y variable value by 1 and increments the value of x by 1, and prints method value.
  • At the last step,  method f is called that pass value "3, 6" in its parameter and prints its value that is " 3 1".  

Learn more:

  • Find output: https://brainly.in/question/7882484
Similar questions