I've programmed in C++ for a while and recently decided to try to learn a bit of Linux and am just trying to do a simple little calculator and I'm having a bunch of trouble.
I'm skipping most of the stupid code that isn't necessary aka most of the echos and user prompts
The user is prompted to enter two numbers NUM1 and NUM2, after which they have another prompt to select which operator to use.
echo -n "please enter the first number"
echo -n "Please enter the second number."
echo -n "Please enter which operator you would like to use"
case $selection in
m) let ans=NUM1*NUM2; echo $ans;;
*) echo -n "Please enter proper data"
echo " "
the output gives me a '0' every time..why is that?
edit: this is only one of the cases because that's as far as I've gotten so far, it will be doing more.