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
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
Physics,
2 months ago
Math,
5 months ago
Computer Science,
5 months ago
History,
10 months ago
Accountancy,
10 months ago