View Code of Problem 8

#include "stdio.h"
#include "string.h"

void main()
{	
	int i;
	int n;
	char s[100];
	int a[10]={78,71,79,72,72,72,72,72,71,71};
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%s",s);
		printf("%d\n",365-a[s[strlen(s)-1]-'0']);
	}

}

Double click to view unformatted code.


Back to problem 8