View Code of Problem 8

#include <stdio.h>
#include <string.h>
#include <math.h>
#include <stdlib.h>
#include <ctype.h>
 
int main() {
    int n;
    scanf("%d",&n);
	char s[100];
	int a[10]={287,294,286,293,293,293,293,293,294,294};
	for(int i=0;i<n;i++){
		scanf("%s",s);
		int t=s[strlen(s)-1]-'0';
		printf("%d\n",a[t]);
		
		
	} 
}

Double click to view unformatted code.


Back to problem 8