このプログラムの出力を正しく動作させるにはどうすればよいですか? 文字列配列に値が保存されず、プログラムの最後に出力されない理由がわかりません。ありがとう。
#include <iostream>
#include <string>
using namespace std;
int main ()
{
    int score[100], score1 = -1;
    string word[100];
    do
    {
        score1 = score1 + 1;
        cout << "Please enter a score (-1 to stop): ";
        cin >> score[score1];
    }
    while (score[score1] != -1);
    {
        for (int x = 0; x < score1; x++)
        {
            cout << "Enter a string: ";
            getline(cin,word[x]);
            cin.ignore();
        }
        for (int x = 0; x < score1; x++)
        {
            cout << score[x] << "::" << word[x] << endl; // need output to be 88:: hello there.
        }
    }
}