Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
need help on Unix program
Name: mollyrb Date: April 28, 2003 at 17:30:14 Pacific OS: windows 98 CPU/Ram: I don't know
Comment:
Hey I'm doing a programmaning project in class. One of the programs I have to do is to create a program that will allow the user to type in a number, while the program outputs the number in words. Example, if you typed in 21, the computer would respond with twenty-one. Please allow the program to work for 0-50. If a number typed is not in that range, be sure to let the user know. I really need help with this program. How would I go about doing it? all the programs have to be in the bourne shell by the way. If you can help me please feel free to e-mail me at mollyrb_80@yahoo.com thanks!
Name: nails Date: April 28, 2003 at 23:26:02 Pacific
Reply:
Molly:
The easiest way of handling this is to use a tool that supports arrays such as awk or perl. Here's a stub that handles only 0 to 4 but you should be able to expand it and do some minor error checking:
Summary: Hi...everybody I really need help on this. I'm using SCO Unix System V/386 Release 3.2 and I'm trying to set the network card PCI on Compaq Prosignia 300. Firstly when I type netconfig it said that no...
Summary: I am wondering why do you need to write this program. Is it the homework ? You'd better do it yourself for your own good. Anyway, the following is a working script: #!/usr/bin/sh echo "Enter an inte...
Summary: dear all, can anyone help me to explain all the commands in the .profile bourne shell below ? really appreciate ur help. PLEASE. 1 2 # @(#) $Revision: 72.2 $ 3 4 # Default user .profile file (/usr/bin...