Computer Science, asked by kalpananemu01, 5 months ago

int x=8;
if (x%2 ==0)
{ {
printf("%d is Even”,x);
}
else
printf(“%d is Odd”,x);
}​

pls help me iam in ?????

its snippet question friends

Answers

Answered by anindyaadhikari13
2

Question:-

  • Write the output of following code snippet.

Solution:-

Given code,

int x=8;

if (x%2 ==0)

{

printf("%d is Even”,x);

}

else

printf(“%d is Odd”,x);

Here,

x%2=8%2=0

So,

x%2==0

if block will execute.

So,

Output:-

8 is even.

Output:-

8 is even.

Similar questions
Accountancy, 10 months ago