#include <stdio.h>
#include <stdlib.h>
int main(void)
{
char card_name[3];
puts("Enter the card name: "); int val = 0;
if (card_name[0] == 'K')
{
val = 10;
}
else if (card_name[0] == 'Q')
{
val = 11;
}
else if (card_name[0] == 'J')
{
val = 12;
}
else if (card_name[0] == 'A')
{
val = 13;
}
else
{
}
printf("The card value is: %i\n", val
); return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxzdGRsaWIuaD4KaW50IG1haW4odm9pZCkKewogICAgY2hhciBjYXJkX25hbWVbM107CiAgICAgICAgcHV0cygiRW50ZXIgdGhlIGNhcmQgbmFtZTogIik7CiAgICAgICAgICAgIHNjYW5mKCIlcyIsIGNhcmRfbmFtZSk7CiAgICAgICAgICAgICAgICBpbnQgdmFsID0gMDsKICAgICAgICAgICAgICAgIGlmIChjYXJkX25hbWVbMF0gPT0gJ0snKSAKICAgICAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgICAgIHZhbCA9IDEwOwogICAgICAgICAgICAgICAgICAgIH0gCiAgICAgICAgICAgICAgICBlbHNlIGlmIChjYXJkX25hbWVbMF0gPT0gJ1EnKQogICAgICAgICAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgICAgICAgICAgdmFsID0gMTE7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZSBpZiAoY2FyZF9uYW1lWzBdID09ICAnSicpCiAgICAgICAgICAgICAgICAgICAgewogICAgICAgICAgICAgICAgICAgICAgICB2YWwgPSAxMjsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlIGlmIChjYXJkX25hbWVbMF0gPT0gJ0EnKQogICAgICAgICAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgICAgICAgICAgdmFsID0gMTM7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZSAKICAgICAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgICAgIHZhbCA9IGF0b2koY2FyZF9uYW1lKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgcHJpbnRmKCJUaGUgY2FyZCB2YWx1ZSBpczogJWlcbiIsIHZhbCk7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIDA7Cn0=