View Code of Problem 8

#include "stdio.h"
#include "string.h"
#include "ctype.h"
#include "math.h"
int main()
{
	int a[10]={78,71,79,72,72,72,72,72,71,71};
	int n,i,c;
	char b[100];
	scanf("%d",&n);
	while(n--)
	{
		scanf("%s",b);
		int len=strlen(b);
		c=b[len-1]-'0';
		printf("%d\n",365-a[c]);
	}
    return 0;
}

Double click to view unformatted code.


Back to problem 8