Grader: Sriram Narasimhan
The purpose of this assignment is to write a simple MAL program.
The MAL program reads in a user entered string, prints it out in reverse order and calculates and prints the string length. A linefeed ' \n' character terminates the string and is not counted as part of the string length. Sample runs of the program might look like:
Enter a string : abcde Reversed string : edcba String length : 5 Enter a string : 9 3 zzz Reversed string : zzz 3 9 String length : 7 Enter a string : one two three four Reversed string : ruof eerht owt eno String length : 18
The following requirements must be followed to receive full credit for the assignment.
For this and all subsequent assignments, you should use the graphical interface of the simulator sim instead of simp . The usage is similar to that of simp except that you have to use it as
sim filenamewhere filename is the source file.
Further information about this simulator can be accessed through the CS354 Mosaic Home page.
You are to turn in the source code for your program by using the handin8 program. Make sure that you enter your full name, UW ID # and Instructor's name in the code that you turn in. When you have completed the assignment, hand in your source code by typing:
~cs354-1/bin/handin8 filename
where filename is the file containing the source code.