您为什么要system("PUASE")和 return exit_success?
by Siyuan @ 2018-03-14 18:34:01
@[siyuan](/space/show?uid=49725) +1
by SofanHe @ 2018-03-14 18:40:57
@[siyuan](/space/show?uid=49725) 哦哦 好吧 我去试试
谢谢
by KevinC @ 2018-03-14 20:12:20
(*^▽^*)改完了 不过还是有两个WA 我要去改一改
by KevinC @ 2018-03-14 20:15:11
```
#include<iostream>
#include<cstring>
using namespace std;
int main()
{
int a[20], s, c;
char b[20];
c = 1;
s = 0;
cin >> b;
for(int i = 0;i < 13;i++)
{
if(i != 1 && i != 5 && i != 11)
a[i] = b[i] - '0';
}
if(b[12] == 'X') a[12] = 10;
for(int i = 0;i < 13;i++)
if(i != 1 && i != 5 && i != 11 && i != 12)
{
s += a[i] * c;
c++;
}
s %= 11;
if(s == a[12])
cout << "Right";
else
{
for(int i = 0;i < 11;i++)
{
if(i == 1 || i == 5)
{
cout << "-";
continue;
}
cout << a[i];
}
if(s == 10)
cout << "-X" << endl;
else
cout << "-" << s << endl;
}
system("PAUSE");
return EXIT_SUCCESS;
}
```
感谢大神帮助
已经过了这道题啦
✿✿ヽ(°▽°)ノ✿
by KevinC @ 2018-03-14 20:33:42