<mosaic.cnfolio.com>
PROGRAM
  1. /* prompt player 1 to have 2-10 cards
  2.    prompt player 2 to have 2-10 cards
  3.    only numbered cards 1-10 are used
  4.    prompt player 1 to sort with descending order
  5.    prompt player 2 to sort with descending order
  6.    prompt player 1 to show highest value card
  7.    prompt player 2 to show highest value card
  8.    IF player 1 has higher value card
  9.    THEN player 1 wins
  10.    ELSE player 1 does not win
  11.    IF plaer 2 has higher value card
  12.    THEN player 2 wins
  13.    ELSE player 2 does not win
  14.    IF player 1 card = player 2 card
  15.    THEN player 1 draws next highest card
  16.         player 2 draws next highest card , repeat line 8-13
  17.     IF player 1 runs out of card
  18.     THEN games ends and player 2 wins
  19.     IF player 2 runs out of card
  20.     THEN games ends and player 1 wins
  21.     IF player 1 and player 2 run out of card
  22.     THEN game draw */
  23.        
  24.  
  25.  
  26. #include <stdio.h>
  27.  
  28. int main()
  29. #define MAX_SIZE 100
  30.  
  31. {
  32.     // Get input of number of cards for each player and cards and add to arrays:
  33.  
  34.     int p1Cards[10] ={0};
  35.     int p2Cards [10]={0};
  36.     int p1size=0;
  37.     int p2size=0;
  38.  
  39.     // Sort arrays into desceding order
  40.    scanf("%d",&p1size);
  41.    for (int i=0 ; i<p1size;i++)
  42.    { scanf("%d", &p1Cards[i]);
  43.  
  44.    }
  45.    scanf("%d",&p2size);
  46.    
  47. }
  48.     // Play game