summaryrefslogtreecommitdiff
path: root/xsc_debug.cpp
diff options
context:
space:
mode:
authorjstmax! <87650746+MaxWasTakenYT@users.noreply.github.com>2024-10-17 18:40:07 +0000
committerGitHub <noreply@github.com>2024-10-17 18:40:07 +0000
commitb21cb476c60953a8a361ca74659d6f4d35d112bb (patch)
treed49a070f4688966e1c4efbeb27f2ef7b6d08f930 /xsc_debug.cpp
parentf9670154f9fb79bb6b466295c73b3f6b6888bb89 (diff)
Update and rename xsc_debug.cpp to xsc.cpp
Diffstat (limited to 'xsc_debug.cpp')
-rw-r--r--xsc_debug.cpp27
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;
-}