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
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
Geography,
3 months ago
Physics,
3 months ago
English,
7 months ago
Business Studies,
11 months ago
Biology,
11 months ago