<mosaic.cnfolio.com>
PROGRAM
  1. /*START
  2.    enter player1 name
  3.    enter player2 name
  4. if conpetitor 1 and 2  finish writting their name
  5. then
  6.       DISPLAY start the game
  7. END IF
  8.       player1 and player 2 Obtain your cards 2 to 10 card
  9.       Calculate the number cards of each the players will get 2 to 10 cards
  10.       player1 rearrange your card from the hightest to the lower
  11.       player2 rearrange your card from the hightest to the lower
  12.       player1 draw your highest card in your hand
  13.       player1 draw your highest card in your hand
  14.          if player1 one draw a card highter then player2
  15.                DISPLAY turn won by the player1
  16.             ELSE
  17.          if player2 one draw a card highter then player1
  18.             THEN
  19.               DISPLAY turn won by the player 2
  20.             ELSE
  21.          if both players have same card, both player will need to draw their highest card from thier hand agian 
  22.            THEN
  23.                DISPLAY turn won by the player who had the hightest card
  24.             ELSE
  25.          if players1 run out of card and player2 still have a card or more
  26.             THEN
  27.                DISPLAY game ended!! won by player2
  28.             ELSE  
  29.          if players2 run out of card and player1 still have a card or more
  30.             THEN
  31.                DISPLAY game ended!! won by player1
  32.             ELSE   
  33.          if both of players run out of cards
  34.                DISPLAY game ended as a draw
  35.           END IF
  36.         END IF
  37.       END IF
  38.     END IF
  39.   END IF
  40. END*/
  41.  
  42. #include <stdio.h>
  43.  
  44. int main( void )
  45. {
  46.  
  47.  
  48. int player1numbercard_deck;
  49. int player2numbercard_deck;
  50. int player1_cards[10];
  51. int player2_cards[10];
  52.  
  53.  
  54.  
  55. scanf("%d\n", &player1numbercard_deck);
  56. printf("%d\n", player1numbercard_deck);
  57.  
  58.  
  59.   if (player1numbercard_deck < 2){
  60.     printf("error, Number too low enter a value between 2 and 10");
  61.     return 0;
  62.    }else if (player1numbercard_deck >10){
  63.       printf("error, Number too high enter a value between 2 and 10");
  64.        return 0;
  65.          }
  66.      
  67.  
  68. scanf("%d", &player2_cards [10]);{
  69. printf("%d", player2_cards [10]);
  70. }
  71.  
  72.  
  73.  
  74. int temp;
  75. for (int j = 0; j < player1numbercard_deck   -1 ; j++)
  76. {
  77. for ( int i =0; i < player1numbercard_deck -1 ; i++)
  78. {
  79. if ( player1_cards [1] < player1_cards [i+1])
  80. {
  81. temp = player1_cards [1];
  82.  player1_cards [i] = player1_cards [i+1];
  83.   player1_cards [i+1] = temp;
  84. }
  85. }
  86. }
  87. printf("player1_cards  \n");
  88. for (int i=0; i < player1numbercard_deck; i++)
  89. {
  90. printf("%d " , player1_cards[i]);
  91. }
  92. }