Tina's trainer have given her two positive integers U and V. Now her task is ti find the number of pairs of positive integers (X,Y) such that 1≤X≤U, 1≤Y≤V and X+Y is even.Tina is finding difficult to understand the problem.Can you help her solving the problem?
#include <stdio.h>
int main()
{
int U,V;
scanf("%d%d",&U,&V);
printf("%d",(((U*V)+1)/2));
return 0;
}
Comments
Post a Comment