G card (separated with a space between), the third line of input for the requirement of the number of CARDS, please by calculation,
Output numerical the biggest poker you can play the combination (according to the numerical) since the childhood, and output
Their total value
Input:
5
2, 3, 6 and 9 K
3
Output:
9 K 2
37 for help with c
This is my error code
#include
Int main ()
{
Int x, I, n, m, j, t;
Int a [13]={3,4,5,6,7,8,9,10,11,12,13,14};
Char b [100];
The scanf (" % d ", & amp; n);
The scanf (" % s ", & amp; b);
The scanf (" % d ", & amp; M);
for(i=0; i
If (b [I]=='J') [I]=b;
If (b [I]=='Q') b [I]=12;
If (b [I]=='K') [I]=b;
If (b [I]=='A') [I]=b;
If (b [I]=='2') [I]=b;
}
for(j=0; J
for(i=0; i
If (b [I] & gt; B [I + 1])
{
T=b [I];
B=b [I] [I + 1);
B [I + 1]=t;
}
}
}
for(i=0; i
If [I]==11 (b) b [I]='J';
If [I]==12 (b) b [I]='Q';
If [I]==13 (b) b [I]='K';
If [I]==14 (b) b [I]='A';
If (b [I]==15) b [I]='2';
}
For (n. N>=n - m; N -)
{
Printf (" % 2 d "[n]. B);
}
For (n. N>=n=m; N -)
{
X=x + b [n].
}
return 0;
}
CodePudding user response:
Your problemCodePudding user response:
Can you help me with this problem