
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!

SCHOOL OF COMPUTER & INFORMATION SCIENCES CSC 320 Programming Assignment 1.
You are to write a program in which a user enters hexadecimal number strings, and the corresponding signed decimal numbers are outputted. The program is exited when the user enters a blank string.
For hexadecimal number strings, leading blanks are ignored, and then the number starts with โ0xโ or โ0Xโ. The digits can be numbers, or either uppercase or lowercase characters โaโ-โfโ. A message saying โInvalid hexadecimal numberโ should be output if the entered string is not a valid hexadecimal string (by these specifications).
The only system calls you may use are read string_ , write_string , and write_int.
You must write and use a procedure to convert the inputted hexadecimal string with the following specifications: