Thought Game
Sadia is one of the nicest persons you will ever meet. In fact, she is one of those persons who like even numbers only.
Today, Sadia wants to play a game with you. She will give you two integers and you will have to determine the average of it.
But, there is one problem. Since Sadia doesn’t like odd numbers, you need to figure out if the result will make Sadia happy.
Today, Sadia wants to play a game with you. She will give you two integers and you will have to determine the average of it.
But, there is one problem. Since Sadia doesn’t like odd numbers, you need to figure out if the result will make Sadia happy.
Input
Input starts with an integer T (1 ≤ T ≤ 10) donates test case.
Each of the next T lines will contain two integers Xi and Yi (1 ≤ Xi ≤ 100, 1 ≤ Yi ≤ 100).
Each of the next T lines will contain two integers Xi and Yi (1 ≤ Xi ≤ 100, 1 ≤ Yi ≤ 100).
Output
For each of the T lines, print whether Sadia will be happy with the result or not as either:
Sadia will be happy.
Or,Oops!
#include <stdio.h>
int main()
{
int n,i,x,y,avg;
scanf("%d", &n);
for(i=0; i<n; i++)
{
scanf("%d %d", &x, &y);
avg=(x+y)/2;
if(avg%2==0)
printf("Sadia will be happy.\n");
else
printf("Oops!\n");
}
return 0;
}