LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Creating a script that adds or subtracts. (https://www.linuxquestions.org/questions/linux-newbie-8/creating-a-script-that-adds-or-subtracts-773388/)

larry5757 12-04-2009 01:33 AM

Creating a script that adds or subtracts.
 
Hello,

I need to create a script that takes two numbers as input from the user, and then asks the user if they would like to add or subtract the two numbers (using a case statement). Then print out the result in a friendly message. I also have to make sure to let the user know if they choose an option that was not on the menu. Any help would be appreciated!

Nylex 12-04-2009 01:39 AM

It would help if you gave us more information, i.e. what you've done so far, the language you're working in and what you're having problems with. This doesn't seem like a complicated task..

catkin 12-04-2009 01:43 AM

What did you learn in class? What resources are you using to help learn shell scripting? What have you tried so far?

pixellany 12-04-2009 06:36 AM

Per the LQ Rules, please do not post homework assignments verbatim. We're happy to assist if you have specific questions or have hit a stumbling point, however. Let us know what you've already tried and what references you have used (including class notes, books, and Google searches) and we'll do our best to help. Also, keep in mind that your instructor might also be an LQ member.

What is particularly rude here is that you did not respond to the 2 replies---both posted within 10 minutes of your original question.

Please feel free to start a new thread that meets these guidelines.


All times are GMT -5. The time now is 01:55 AM.