HI, I need help creating the main file and the cpp file for this assignment. It
ID: 3674585 • Letter: H
Question
HI, I need help creating the main file and the cpp file for this assignment. It doesn't make sense to me.
For this assignment, the algorithm which generates stars and bars - Comb() (comb.txt), shall be provided. Do not hard code the combination sequences. The stars and bars will be generated for 4 stages of the game: 6 combination 5 (stage 1), 6 combination 4 (stage 2), 6 combination 3 (stage 3) and 6 combination 2 (stage 4). Your task is to implement a “guess the next sequence” game. Given a sequence of stars and bars, the user should guess the next sequence. The user is given three tries to guess the right sequence, if the third guess is incorrect the correct sequence will be given and a new sequence will be given.However, if the guess sequence is correct, the user is presented with another sequence to guess and only moves on to the next stage if the number of incorrect guess is less than half of the total number of guesses.
Consider the following restrictions: 1. The number of guesses must be between 2 and half of the total number of combination; for example, for 6 combination 2 (15 possibilities), The total number of guesses should be a random number between 2 and 7 (inclusive).
2. The first 2 combinations shall not be included as part of the guess game
3. If the total number of incorrect user guesses exceeds half of the total number of guesses, game over. Else the user moves on to the next level.
4. At the end of each stage, notify the user about the transition to the next stage. At the end of the game, show the user number of incorrect guesses.
hint:And don't forget to seed it inside the main function as follows: srand(time(NULL));
__________________________________________________________________________________________________________
comb().txt
Explanation / Answer
You have written the code is correct and iam sending the code to print the stars you can use it for bars also try this one include using namespace std; void printStars( int n, char s); int main() {int n; char s; //int s; coutRelated Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.