-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.c
More file actions
executable file
·91 lines (88 loc) · 2.28 KB
/
Copy pathmain.c
File metadata and controls
executable file
·91 lines (88 loc) · 2.28 KB
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
/* The main function interacts with the user
and calls the appropriate functions */
#include <stdlib.h>
#include "stdio.h"
#include "main.h"
extern int user_yes_no (void);
extern int warning;
extern int models_done;
extern void data_user(void);
extern void print_flash(void);
extern void fractional_user(void);
extern void print_page_clean(void);
extern void print_fractional(void);
extern void azeotrope_search(void);
extern void batch_array_creation(void);
extern void print_azeotrope_warning(void);
int print_flash_marker = 0;
int print_batch_marker = 0;
int print_fractional_marker = 0;
void fractional_distillation_array_creation(void);
int main (int argc, char *argv[])
{
static int first_run;
if(first_run == 0)
{
data_user();
azeotrope_search();
first_run++;
}
switch (model_choice())
{
case 1 :
flash_user();
models_done = abs(models_done);
print_flash_marker = 1;
printf("\nWould You Like To Analysis This System Using Another Model? ");
if(user_yes_no() == 0)
{
break;
}
main(argc, argv);
case 2 :
/* batch_user(); */
models_done = abs(models_done);
print_batch_marker = 1;
printf("\nWould You Like To Analysis This System Using Another Model? ");
if(user_yes_no() == 0)
{
break;
}
main(argc, argv);
case 3 :
fractional_user();
models_done = abs(models_done);
print_fractional_marker = 1;
printf("\nWould You Like To Analysis This System Using Another Model? ");
if(user_yes_no() == 0)
{
break;
}
main(argc, argv);
default :
printf("\nNo More Models Are Avaliable\n");
if(models_done == -1)
{
exit(0);
}
break;
}
print_page_clean();
if(warning == 1)
{
print_azeotrope_warning();
}
if(print_flash_marker == 1)
{
print_flash();
}
if(print_batch_marker == 1)
{
/* print_batch();*/
}
if(print_fractional_marker == 1)
{
print_fractional();
}
exit(0);
}