Computer Science, asked by Kg4571, 7 months ago

int g (int x, int n) { for (int i = 0; i < n; i++) { if (i % 2 == 0) { x *= i + 1; continue; } x--; if (x == 0) { break; } } return x; } what is g(2,3)

Answers

Answered by BLANKBABA
11

Answer:

Answer is 3

Brainliest please

Explanation:

#include<stdio.h>

int g (int x, int n) {

for (int i = 0; i < n; i++) {

if (i % 2 == 0) {

x *= i + 1;

continue;

}

x--;

if (x == 0) {

break;

}

}

return x;

}

int main()

{

printf("Numbers are %d",g(2,3));

return 0;

}

Similar questions