北大ACM,Presentation Error,OutputThe output will only be the converted number as it would appear on the display of the calculator.The number should be right justified in the 7-digit display.If the number is to large to appear on the display,then pr
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/16 02:59:02
北大ACM,Presentation Error,OutputThe output will only be the converted number as it would appear on the display of the calculator.The number should be right justified in the 7-digit display.If the number is to large to appear on the display,then pr
北大ACM,Presentation Error,
Output
The output will only be the converted number as it would appear on the display of the calculator.The number should be right justified in the 7-digit display.If the number is to large to appear on the display,then print ``ERROR'' (without the quotes) right justified in the display.
#include
#include
using namespace std;
int bas(char c)
{
if(isalpha(c))
return c - 'A' + 10;
return c - '0';
}
int main()
{
char str[8];
int l,b1,b2,n,k,num[10];
while(cin >> str >> b1 >> b2)
{
n = k = 0;
l = strlen(str);
for(int i=0; i 7) cout
北大ACM,Presentation Error,OutputThe output will only be the converted number as it would appear on the display of the calculator.The number should be right justified in the 7-digit display.If the number is to large to appear on the display,then pr
第28行," ERROR"改为"ERROR",不带空格,试试.