-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_equationTester.c
36 lines (33 loc) · 919 Bytes
/
_equationTester.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
/*
* Toggle the comment on the header you want to use.
* equations.h Standard functions regarding equations;
* e.g. reading, printing, basic solver and operations.
*
* rpoly.h Advanced equation solver with read/print functions.
* Finds all solutions in both real and complex planes.
*/
#include "equations.h"
//#include "rpoly.h"
/**
* Parse the input and give the equation output.
* argc = lenght of cmd-line args
* argv = array of args = array of strings
*
* Cmd-line expects greatest degree coefficient first.
* Parse cmd-line args only once, then user input.
*
* No args? Read from user input.
*/
int main(int argc, char *argv[]) {
int readFromCmd = argc - 2;
EQUATION e;
#ifdef _USE_RPOLY
while (makeEquation_ak1(&e, argv, readFromCmd) > 0)
#else
while (makeEquation(&e, argv, readFromCmd) > 0)
#endif
{ readFromCmd = 0; putchar('\n'); };
printf("\n");
system("PAUSE");
return 0;
}