include<stdio.h>
void call(int num)
{ int count = 15;
while (count > 0)
{
if (num % 3 == 4);
{
count count - 3;
}
else if (num % 3 == 1)
count = count - 1;
}
else
{
count = count -2;
}
num++;
}
print("%d",num);
}
int main()
{
int x=23;
call(x);
return 0;
}
Answers
Answered by
0
Answer:
32
Given:
#include <stdio.h>
void call(int num)
{ int count = 15;
while (count > 0)
{
if (num % 3 == 4)
{
count= count - 3;
}
else if (num % 3 == 1)
{count = count - 1;
}
else
{
count = count -2;
}
num++;
}
printf("%d",num);
}
int main()
{
int x=23;
call(x);
return 0;
}
Explanation:
- Here the functions call is executed with num=23 and count =15
- Then according to the given function count is decreased and num is increased till the value of count reaches 0 and the function call terminates when num is 32
Similar questions
Science,
10 days ago
English,
10 days ago
Social Sciences,
10 days ago
Math,
9 months ago
Geography,
9 months ago