Browse Source

Added input handler

remotes/origin/develop
Eric Bagus 11 months ago
parent
commit
57b66f23b2
  1. 14
      src/inputHandler.c
  2. 6
      src/inputHandler.h

14
src/inputHandler.c

@ -0,0 +1,14 @@
#include "inputHandler.h"
int getOperationId(char symbol) {
int id = 0;
switch (symbol) {
case '+':
return 1;
case '-':
return 2;
case '*':
return 3;
}
return id;
}

6
src/inputHandler.h

@ -0,0 +1,6 @@
#ifndef THEADMIRALS_INPUTHANDLER_H
#define THEADMIRALS_INPUTHANDLER_H
int getOperationId(char);
#endif //THEADMIRALS_INPUTHANDLER_H
Loading…
Cancel
Save