问一下这个代码为什么会出错
#include<iostream>#include<string>
#include<algorithm>
#include<iterator>
using namespace std;
int a[6];
//one two three four five six seven eight nine ten eleven twelve thirteen fourteen fifteen sixteen seventeen eighteen nineteen twenty
//a both another first second third
int main(){
string s;
cin >> s;
int count = 0;
int j = 0, temp = 0;
for(int i = 0; i < 6; i++){
string s1;
while(s[j] != ' ' || s[j] != '.'){
j++;
}
for(; temp < j; temp++){
int z = 0;
s1[z] = s[temp];
z++;
}
temp++;
j++;
if(s1 == "one" || s1 == "a" || s1 == "first"){
a[count] = 1;
count++;
}
else if(s1 == "two" || s1 == "second" || s1 == "both"){
a[count] = 2;
count++;
}
else if(s1 == "three" || s1 == "third" || s1 == "another"){
a[count] = 3;
count++;
}
else if(s1 == "four"){
a[count] = 4;
count++;
}
else if(s1 == "five"){
a[count] = 5;
count++;
}
else if(s1 == "six"){
a[count] = 6;
count++;
}
else if(s1 == "seven"){
a[count] = 7;
count++;
}
else if(s1 == "eight"){
a[count] = 8;
count++;
}
else if(s1 == "nine"){
a[count] = 9;
count++;
}
else if(s1 == "ten"){
a[count] = 10;
count++;
}
else if(s1 == "eleven"){
a[count] = 11;
count++;
}
else if(s1 == "twelve"){
a[count] = 12;
count++;
}
else if(s1 == "thirteen"){
a[count] = 13;
count++;
}
else if(s1 == "fourteen"){
a[count] = 14;
count++;
}
else if(s1 == "fifteen"){
a[count] = 15;
count++;
}
else if(s1 == "sixteen"){
a[count] = 16;
count++;
}
else if(s1 == "seventeen"){
a[count] = 17;
count++;
}
else if(s1 == "eighteen"){
a[count] = 18;
count++;
}
else if(s1 == "nineteen"){
a[count] = 19;
count++;
}
else if(s1 == "twenty"){
a[count] = 20;
count++;
}}
for(int i = 0; i < count; i++){
a[i] = a[i]*a[i];
a[i] %= 100;
}
sort(a, a+count);
for(int i = 0; i < count; i++){
if(a[i] == 0) continue;
cout << a[i];
}
return 0;
}