-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.c
99 lines (85 loc) · 2.94 KB
/
main.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
/******************************************************************************
* Copyright (C) 2023 Nymph <Academy of Artemis>
* Copyright (C) 2023 liulitchi <[email protected]>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*
* Ακαδημία της Αρτέμιδος(Academy of Artemis) is a loosely connected
* network of math learning group, whose members share a common interest
* in mathematics and statistics and often exchange their learning
* experiences with one another.
*
* main.c
* Last edited: 2023/6/23
******************************************************************************/
#if defined(__linux__) || defined(__APPLE__)
#include <unistd.h>
#elif defined(_WIN32) || defined(_WIN64)
#include <windows.h>
#endif
void sleeps(int Time) {
#if defined(__linux__) || defined(__APPLE__)
sleep(Time);
#elif defined(_WIN32) || defined(_WIN64)
Sleep((Time*1000));
#endif
}
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include "branch.h"
int main(void) {
// combination(4, x), x from 0 to 4
int comb4[16] = {0, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 4};
int value = 0;
srand((unsigned)time(NULL)) ;
int i = rand() % 16; // top
int j = rand() % 16; // middle
int k = rand() % 16; // down
value = 100 * comb4[i] + 10 * comb4[j] + comb4[k];
sleeps(3);
printf("天清地宁,河图秉灵。\n");
sleeps(3);
printf("焚香一炷,十方肃清。\n");
sleeps(3);
printf("发鼓三通,万神咸听:\n");
sleeps(3);
puts("天地合德,四时合序。");
sleeps(3);
puts("皇天无私,惟德是辅。");
sleeps(3);
puts("吉当言吉,凶当言凶。");
sleeps(3);
puts("得失是非,惟卦是推。");
sleeps(3);
printf("\n\n");
//puts("出卦中……");
//printf("\n\n");
sleeps(3);
puts("占卜进度▓░░░░░░░░░10%……");
sleeps(3);
puts("占卜进度▓▓▓░░░░░░░30%……");
sleeps(3);
puts("占卜进度▓▓▓▓▓░░░░░50%……");
sleeps(3);
puts("占卜进度▓▓▓▓▓▓▓░░░70%……");
sleeps(3);
puts("占卜进度▓▓▓▓▓▓▓▓▓░90%……");
sleeps(3);
printf("\n");
//printf("value = %d\n", value);
branch1(value);
return 0;
}