Previous section To contents

2.5 Simple exercises

  • Make a program which writes hello world 10 times.
  • Modify hello_world.pike to write the first argument to the program.
  • Make a program that writes a hello_world program to stdout when executed.
  • Modify the register program to store data about programs and diskettes instead of songs and records.
  • Add code to the register program that checks that the user typed an argument when required. The program should notify the user and wait to receive more commands instead of exiting with an error message.
  • Add code to the register program to check that the arguments to show_record and delete_records are numbers. Also make sure that the number isn't less than one or bigger than the available number of records.
  • Rewrite the register program and put all the code in main().

  • Previous section To contents