<mosaic.cnfolio.com>
PROGRAM
1. /*START*/
2. /*WHILE two of the players hands are not between 1 and 11*/
3.  /*get hand size for player 1 and player 2*/
4. /*END WHILE*/
5. /*While numbered cards of the player 1 and player 2 are between 1 and 10*/
6. /*get the numbered cards ready in their hand*/
7. /*END WHILE*/
8.
9. /*WHILE both players hands have not been arranged*/
10. /*WHILE the list isnt arranged correctly in the descending sequence
11. /*WHILE the list isnt arranged correctly*/
12.  /*IF the card that is next in the players hand is bigger than the present number
13.   /*Exchange the 2 numbers*/
14. /*END IF*/
15.  /*Proceed to the next card after the present card*/
16. /*END WHILE*/
17. /*Proceed to the next player*/
18. /*END WHILE*/
19. /*WHILE both players have cards in their hands*/
20. /*IF player 1 and player 2 cards are 0*/
21. /*OUTPUT DRAW*/
22. /*END IF*/
23. /*IF the player 1's hand is equal to 0*/
24. /* That means player 2 wins
25. /*END IF*/
26. /*IF player 2's hand is equal to 0*/
27. /* That means player 1 wins
28. /*END IF*/
29. /*IF player 1 has more cards than player 2*/
30. /*The OUTPUT will be that player 1 WINS*/
31. /*END IF*/
32. /*END*/
33.
34. #include <stdio.h>
35.
36. int main(){
37. void bubblesort (int array[],int n)
38. {
39. int c,d,swap;
40.
41. //shwowing the results of the game
42.
43. if(judge==-1)
44. {
45. printf("the game is a draw")
46. {
47. else if (judge==0)
48. {
49. printf("player 1 wins the game")
50. }
51. else if(judge==1)
52. {
53. printf("player 2 wins")