Machine Problem 1

22C:18, Spring 1996

Due Tuesday Feb. 13, 1995, in discussion

Douglas W. Jones

Write an M68000 program that requests a number from the keyboard, requests the number base in which that number should be printed, and then outputs that number, in that base. You may use decin to read the number. You must use strout to output the characters of the result.

A sample run of your program might look like the following:

    Enter a number: 30
    Enter the base: 11
    The number is: 28
You are free to make rational assumptions about any details of this assignment that are not specified here!

Note that your solution must be clearly commented, and it must begin with a comment that includes your name, the course number, your section, the program title (MP1 is good enough) and a clear but brief explanation of what the program does.

As in most elementary programming courses, merely making the program function correctly will not (!!) give you full credit. Commentary and formatting should make the program easy to understand, and credit will be reduced for insufficient commenting, bad formatting or for excessive or distracting commenting!