View Code of Problem 8

#include<stdio.h>
#include<string.h>
void main()
{
	int n,l,num;
  	int a[10]={78,71,79,72,72,72,72,72,71,71};	
	scanf("%d",n);
	while(n--)
	{
		char b[10];
		scanf("%s",b);
		l=strlen(b);
		num=b[l-1]-'0';
		printf("%d\n",365-a[num]);
	}

}

Double click to view unformatted code.


Back to problem 8