-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path40.c
60 lines (60 loc) · 1.13 KB
/
40.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
//#define _CRT_SECURE_NO_WARNINGS
//#include <stdio.h>
//#include <time.h>
//#include <stdlib.h>
//
//int main()
//{
// srand((unsigned int)time(NULL));
// int n1, n2, i = 0, j, input, money, debt, judge;
//
// scanf("%d%d", &money, &input);
//
// while (i < input)
// {
// int arr[4] = { 0 };
// n1 = rand() % 10;
// n2 = rand() % 10;
// arr[0] = n1;
// arr[3] = n2;
// if (n1 != n2)
// {
// printf("ÇëÊäÈëÅжϺͶÄ×¢£º");
// scanf("%d%d", &judge, &debt);
// arr[1] = judge;
// arr[2] = debt;
// for (j = 0; j < 4; j++)
// {
// printf("%d ", arr[j]);
// }
// printf("\n");
// if (debt > money)
// {
// printf("Not enough tokens. Total = %d.\n", money);
// continue;
// }
// else
// {
// if ((n1 < n2) == judge)
// {
// money += debt;
// printf("Win %d! Total = %d.\n", debt, money);
// }
// else
// {
// money -= debt;
// if (money <= 0)
// {
// printf("Game Over!");
// break;
// }
// else
// printf("Lose %d. Total = %d.\n", debt, money);
// }
// }
// }
// i++;
// }
//
// return 0;
//}