Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

THIS IS TO BE WRITTEN IN MIPS (50 points) Write a program to accept a one-line string (maximum of 100 characters) from the keyboard. Edit

THIS IS TO BE WRITTEN IN MIPS

(50 points)

Write a program to accept a one-line string (maximum of 100 characters) from the keyboard. Edit the string entered in Part 1a (with code that you write) to remove all the white space, digits, punctuation, and other special characters, leaving only the letters. Print out the resulting compressed string to the screen.

Example: If the input string was If I've told you once, I've told you 1000 times!!Then the output string would be IfIvetoldyouonceIvetoldyoutimes

(50 points) Next, build a letter frequency table (you MUST use a 26 entry WORD integer array) that counts how many times each letter is used in your compressed sentence for Part 1. Count upper case letters as if they were lower case. Print out the numbers in this table to the screen starting with the frequency of "a" and continuing to the frequency of "z". Format the table output to consist of two horizontal lines with 13 numbers in each line. Separate the numbers on the line by a single space. The appropriate output here for the input example from Part 1, would be

Letter Frequency Table

0 0 1 2 4 1 0 0 4 0 0 21

1 5 0 0 0 1 3 2 2 0 0 20

Have the program handle multiple data sets and terminate execution when a null input string is entered.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Modeling And Design

Authors: Toby J. Teorey, Sam S. Lightstone, Tom Nadeau, H.V. Jagadish

5th Edition

0123820200, 978-0123820204

More Books

Students also viewed these Databases questions