Hint: You can edit your post, highlight your code and press the <> formatting button. This will not automatically indent your code. That part is up to you.
You can use the preview button at the bottom to see how it looks.
#include <iomanip>
#include <iostream>
#include <string>
#include <stdlib.h> // <--- Should use <cstdlib>.
#include <ctime>
#include <windows.h> // <--- And this is for?
usingnamespace std; // <--- Best not to use.
int main()
{
//srand(time(NULL));
srand(static_cast<unsignedint>(time(nullptr)));
int finalScore{}; // <--- ALWAYS initialize all your variables.char throws[21]{};
int rolls[21]{};
int scores[10]{};
int rollA{};
int rollB{};
int rollC{};
int y{};
int frame{};
for (int idx = 0; idx < 21; idx++) // Unnecessary if you initialize your variale, unless you want each element to be a space.
throws[idx] = ' ';
for (int idx = 1; idx <= 9; idx++)
{
rollA = rand() % 11;
}
return 0; // <--- Not required, but makes a good break point for testing.
}
At this point including "windows.h" has no benefit to the program.
In C++ there are several C header files that have a C++ version that start with "c". These should be what you use. See the reference section here for a list of these.
I do not see any use for the first for loop. As long as you initialize the variable when you define it it will be filled with (0)zeros or (\0)s. Later on you will be changing these values in the array.
The 2nd for loop is for what? You are looping 9 times, but "rollA" will only contain the value of the last loop. Also you are getting a random number for this value when you should be asking the user to enter a value for the frame.
Looking at your link this explains how to keep score. Your program needs to be dealing with the frames and rolls the same way.
I would suggest mentioning what IDE and compiler you are using along with what you have studied so far. This will help cut down on suggestions that are beyond what you have learned. Even if those suggestions are a better way of writing the program.