summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjstmax! <87650746+MaxWasTakenYT@users.noreply.github.com>2024-10-17 15:12:05 +0000
committerGitHub <noreply@github.com>2024-10-17 15:12:05 +0000
commit88903f019d6cc6fd8265a3b1f8817bbc49d9d276 (patch)
tree0d79598fef2da5772f2c56db91d8669585741263
parentface267b5aef2b726fc061a0207982fa4d0cf76c (diff)
added comments, i guess
-rw-r--r--xsc.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/xsc.cpp b/xsc.cpp
index d2ba8c2..f4642fc 100644
--- a/xsc.cpp
+++ b/xsc.cpp
@@ -4,9 +4,11 @@
using namespace std;
void clear() {
+ // Clears the screen
system("clear");
}
void usage() {
+ // Prints usage message (help)
clear();
system("figlet XSC | lolcat");
cout << "\neXtremelySimpleCalculator usage:\n"
@@ -16,6 +18,7 @@ void usage() {
}
int doOper(int n1, char opx[], int n2) {
+ // Performs calculations, TODO: improve :)
int result;
switch (opx[1]) {
case '+':
@@ -46,6 +49,7 @@ int doOper(int n1, char opx[], int n2) {
}
int main(int argc, char* argv[]) {
+ // Main handler
if (argc > 1) {
if (argv[1] == "--help" || argv[1] == "-h") {
usage();