# A+B Coming

Many classmates said to me that A+B is must needs.
If you can’t AC this problem, you would invite me for night meal. ^_^
InputInput may contain multiple test cases. Each case contains A and B in one line.
Input terminates by EOF.
OutputOutput A+B in decimal number in one line.Sample Input
1 9
A B
a b
Sample Output
10
21
21

#include <stdio.h>

int main(void)
{
int a, b;

while(scanf("%x%x", &a, &b) != EOF) {
printf("%d\n", a + b);
}

return 0;
}  

#include<stdio.h>
#include<ctype.h>
int convert(char x){
if(isdigit(x))
return x-'0';
else if(islower(x))
toupper(x);
return x-'A'+10;
}
/*int convert(char x){
if(islower(x-'0'))
toupper(x-'0');
if(x>='0'&&x<='9')
return x-'0';
else if(x>='A'&&x<='F')
return x-'A'+10;
*/
int main(void){
char a,b;

while(scanf("%c%c",&a,&b)!=EOF){
printf("%d\n",convert(a)+convert(b));
}

}
#include<stdio.h>
#include<ctype.h>
int convert(char x){
if(islower(x-'0'))
toupper(x-'0');
if(x>='0'&&x<='9')
return x-'0';
else if(x>='A'&&x<='F')
return x-'A'+10;
}