hi all, next im working on a blackjack program. cards are just 2-10, giving the user 2 cards and asking 1 for another card or 2 for no.

if they say no, hit 21, or go over they are asked if they want to play again, this is where im struggling. it doesnt start over and read two new cards like i thought it would, it just takes the same two cards. sorry about the indentation and format im working on it.

Code:
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
int main()
{
    
    int i;
    int total;
    int cardchoice, gamechoice;
    int card1, card2, newcard;
    
    srand(time(NULL));
    
    for(i = 0; i < 2; i++) {
          card1 = rand() % 10 + 1;
            if (card1 == 1) {
                      card1 = rand() % 10 + 1;
                            }
          card2 = rand() % 10 + 1;
            if (card2 == 1) {
                      card2 = rand()% 10 + 1;}
    }
    
    printf("You have the following cards: %d, %d\n", card1, card2);
   
    total = card1 + card2;
   
    printf("Your total is currently %d\n",total);
    
    for (i = 0; i < 100000000; i++) {
    printf("Would you like another card? Enter 1 for y or 2 for n: ");
    scanf("%d",&cardchoice);
    
         if (cardchoice == 1) {
    
    
          newcard = rand() % 10 + 1;
              if (newcard == 1) {
                          newcard = rand()% 10 + 1; }
          total = total + newcard;
          
          
          
          printf("\nYou got a %d\n", newcard);
          printf("Your total is: %d\n",total);
          
          if (total > 21) {
                    printf("You lose, you went over 21.\n");
                    printf("Would you like to play again? Enter 1 for y or 2 for n: ");
                    scanf("%d", &gamechoice);
                    if (gamechoice == 1) {
                                      for(i = 0; i < 2; i++) {
                                               card1 = rand() % 10 + 1;
                                               card2 = rand() % 10 + 1;
                                                          }   
                                      }
                    if (gamechoice == 2) {
                                   break;
                                   }
          }
          else if (total == 21) {
                    printf("Congratulations!! You win. You got blackjack!!\n");
                    printf("Would you like to play again? Enter 1 for y or 2 for n: ");
                    scanf("%d", &gamechoice);
                                        if (gamechoice == 1) {
                                                  for(i = 0; i < 2; i++) {
                                                         card1 = rand() % 10 + 1;
                                                         card2 = rand() % 10 + 1;
                                                   }
                                          }
                                        if (gamechoice == 2) {
                                                    break;
                                        }
                                           
                    }
        }
          if (cardchoice == 2) {
                         printf("Would you like to play again? Enter 1 for y or 2 for n: ");
                         scanf("%d", &gamechoice);
                                             if (gamechoice == 1) {
                                                 for(i = 0; i < 2; i++) {
                                                        card1 = rand() % 10 + 1;
                                                        card2 = rand() % 10 + 1;
                                                 }
                                             }
                                   if (gamechoice == 2) {
                                                   break;
                                   }
          }    
    
}    
system("PAUSE");
return 0;
}