Need assist with my loop with a c++ dice program : how do I continue to keep the player rolling the dice till they roll the correct number or lose? 

Here are the directions.

For this assignment, write a program that will simulate a single game of Craps.

Craps is a game of chance where a player (the shooter) will roll 2 six-sided dice. The sum of the die will determine whether the player (and anyone that has placed a bet) wins immediately, loses immediately, or if the game continues. If the sum of the first roll of the die is equal to 7 or 11, the player wins immediately. If the sum of the first roll of the die is equal to 2, 3, or 12, the player has rolled "craps" and loses immediately. If the sum of the first roll of the die is equal to 4, 5, 6, 8, 9, or 10, the game will continue with the sum becoming the "point." The object of the game is now for the player to continue rolling the die until they either roll a sum that equals the point or they roll a 7. If the player "makes their point," they win. If they roll a 7, they lose.

Here is my program:

    #include <iostream>
    #include <ctime>
    #include <cstdlib>
    
    using namespace std;
    
    int main()
    {
    int dice_num1, dice_num2 = 0; 
    int roll_dice;
    int dice_num3, dice_num4 = 0;
    int roll_dice2;
    char repeat = 'y'; 
    
    while (repeat == 'y' || repeat == 'Y') 
    {   
    	srand(time(0));                                                
        dice_num1 = rand() % 6 + 1;
        dice_num2 = rand() % 6 + 1; 
        roll_dice = dice_num1 + dice_num2;
        
        cout <<"Player rolled: "<< dice_num1<<" + "<<dice_num2<<" = "<<roll_dice<<endl;
        cout <<"\nThe point is "<<roll_dice<<endl;
        
        dice_num3 = rand() % 6 + 1;
        dice_num4 = rand() % 6 + 1; 
        roll_dice2 = dice_num3 + dice_num4;
        
        cout <<"\nPlayer rolled: "<< dice_num3<<" + "<<dice_num4<<" = "<<roll_dice2<<endl;
    
    
        
        if (roll_dice2 == 7 || roll_dice2 == 11)
        {
            cout << "Congrats you are a Winner!" << endl ;
        } 
    
        else if (roll_dice2 == 2 || roll_dice2 == 3 || roll_dice2 == 12)
        {
            cout  << "Sorry, you rolled craps, You lose!" << endl; 
        }
    
        else if (roll_dice2 == 4 || roll_dice2 == 5 ||roll_dice2 == 6 ||roll_dice2 == 8 || roll_dice2 == 9 || roll_dice2 == 10)
          {     
            dice_num3 = rand() % 6 + 1;
            dice_num4 = rand() % 6 + 1; 
        int sum_num2 = dice_num3 + dice_num4;
    
         if( sum_num2 == roll_dice2 )
                {
                    cout << "Congrats you are a Winner!" << endl;
                    break;
                } 
        else if( sum_num2 == 7 )
                {
                    cout << "Sorry, You Lose!" << endl;
                    break;
                }
      }
    cout <<"\nAnother game? Y(es) or N(o)"  << endl;
        cin >> repeat;
    
    if (repeat == 'n' || repeat == 'N') 
    {
    cout <<"Thank you for playing!"<< endl;
    return 0;
    }
    }
    }

This is my output:

    Player rolled: 4 + 5 = 9
    
    The point is 9
    
    Player rolled: 5 + 3 = 9
    
    Another game? Y(es) or N(o)

This is what my output needs to be: 

    Player rolled: 2 + 2 = 4
    
    The point is 4
    
    Player rolled: 4 + 5 = 9
    Player rolled: 5 + 1 = 6
    Player rolled: 1 + 2 = 3
    Player rolled: 2 + 3 = 5
    Player rolled: 1 + 2 = 3
    Player rolled: 3 + 5 = 8
    Player rolled: 2 + 4 = 6
    Player rolled: 6 + 3 = 9
    Player rolled: 6 + 2 = 8
    Player rolled: 3 + 4 = 7

    You rolled 7 and lost!

How do i get this to continue rolling the dice in the loop, please tell me what i need to change. Thank you!




