CSE 322 Fall 2018 Lab 10

December 3, 2018

Problem #1 (Chapter 10 Problem 9)

Write a program that uses XLAT to (a) read a line of text, and (b) print It on the next line with all small letters converted to capitals. The Input line may contaln any characters-small letters, capital, letters, digit characters, punctuation, and so on.

To be done by students

Problem #2 (Chapter 10 Problem 10)

Write a procedure printhex that uses XLAT to display the content of BX as four hex digits. Test it In a program that lets the user type a four-digit hex Integer, stores it in BX using the hex Input algorithm of section 7.4, and calls PRINTHEX to print It on
the next line.

To be done by students

Problem #3 (Chapter 11 Problem 8)

A palindrome is a character string that reads the same forward or backward. In deciding if a string is a palindrome, we ignore blanks, punctuation, and letter case. For example “Madam, I’m Adam” or “A man, a plan, a canal, Panama”
Write a program that (a) lets the user input a string (b) prints it forward and backward without punctuation and blank on succesive lines, and (c) decides whether it is a palindrome and prints the conclusion.

To be done by students

Problem #4 (Chapter 11 Problem 8)

In a spreadsheet applications, it is useful to display numbers right justified in fixed fields. For example, these numbers are right justified in a fixed filed of 10 characters:
Write a program to read ten numbers of upto 10 digits each, and display them as above.

TO be done by students

1. Chapter 11 Problem 10
2. All Lab works in this lab

Submit You homework through this link



Print Friendly, PDF & Email

Leave a Reply