View Code of Problem 87

#include<stdio.h>
#include <string.h>
#include <math.h>
void main()
{
int j,t,n,i,flag=0;
scanf("%d",&n);
if(n%2==0)
{
	j=n/2;
	if(n%4==0)
		t=n/4;
	else
		t=n/4+(n%4)/2;
	flag=1;
}
if(flag)
{
		printf("%d %d",t,j);

}
else
printf("0 0");
}

Double click to view unformatted code.


Back to problem 87