Computer Science, asked by kalpananemu01, 4 months ago

int x=8;

if (x%2 ==0)

{

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

}

else

{

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

}

7.
pls give me answer pls pls plsssss​

Answers

Answered by anindyaadhikari13
1

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