Jump to content

mikem1034

Members
  • Posts

    3
  • Joined

  • Last visited

mikem1034's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi! I need to create a script that will create a file and dump formatted text into it. I need to run the script with an argument which will be the filename. #!/bin/sh echo "Hello world" > ../directory/$arg1.txt I need the text added to the file to be like: class Arg1 { public function x() { .... } } Can anybody help me create a script to do this?
  2. Thank you to everyone for the replies and suggestions.
  3. Hi! A friend of mine is trying to write a simulation of an ATM and can't seem to get it right. He want's it like so: If a user wants $100 and there are no $50 notes left, the machine gives them 5 $20 notes. Or if there is only 1 $50 note left in the machine and you want $100, it should dispence 1 x $50, 2 $20's and a $10. I dabbled in Java a few years ago but I tried to do this and have no idea. Maybe a variable to hole the amount of 50's, 20's and 10's in the machine? But after that I'm not sure. Does anyone know how to achieve this? In Java or PHP even? Thanks in advance!
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.