diff options
| author | jstmax! <87650746+MaxWasTakenYT@users.noreply.github.com> | 2024-10-17 18:40:07 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-10-17 18:40:07 +0000 |
| commit | b21cb476c60953a8a361ca74659d6f4d35d112bb (patch) | |
| tree | d49a070f4688966e1c4efbeb27f2ef7b6d08f930 /xsc_debug.cpp | |
| parent | f9670154f9fb79bb6b466295c73b3f6b6888bb89 (diff) | |
Update and rename xsc_debug.cpp to xsc.cpp
Diffstat (limited to 'xsc_debug.cpp')
| -rw-r--r-- | xsc_debug.cpp | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/xsc_debug.cpp b/xsc_debug.cpp deleted file mode 100644 index 16d3745..0000000 --- a/xsc_debug.cpp +++ /dev/null @@ -1,27 +0,0 @@ -#include <iostream> -#include <cmath> -using namespace std; - -void usage() { - // Prints usage message (help) - system("figlet XSC | lolcat"); - cout << "\neXtremelySimpleCalculator usage:\n" - << "`xsc --help | -h` for help\n" - << "`xsc <number> <(+|-|*|/|%|^)> <number>`\n"; -} - -int main(int argc, char* argv[]) { - if (argc > 1 && (argv[1] == "--help" || argv[1] == "-h")) { - usage(); - return 0; - } - else { - if (argc > 1 && argv[2][0] == '+') { cout << atof(argv[1]) + atof(argv[3]); } - else if (argv[2][0] == '-') { cout << atof(argv[1]) - atof(argv[3]); } - else if (argv[2][0] == '*') { cout << atof(argv[1]) * atof(argv[3]); } - else if (argv[2][0] == '/') { cout << atof(argv[1]) / atof(argv[3]); } - else if (argv[2][0] == '%') { cout << fmod(atof(argv[1]), atof(argv[3])); } - else if (argv[2][0] == '^') { cout << pow(atof(argv[1]), atof(argv[3])); } - } - return 0; -} |