Purchase Solution

Pseudo Code: Output Position of First and Last Occurance - CAT

Not what you're looking for?

Ask Custom Question

Modify the pseudo code to (a) Output position of the first occurrence of the word "CAT" (b) Output the position of the last occurrence of the word "CAT"

See attached file for full problem description.

Attachments
Purchase this Solution

Solution Summary

The solution modifies the pseudo code to an output position of the first and last occurrence of the word "CAT."

Solution Preview

(a) When we first find 'CAT', we use break to jump out of the while loop.
POS records the current position of 'CAT'.
Count = 0
POS = 0
While POS < 100
POS = POS + 1
IF BOOK(POS) = 'CAT' ...

Purchase this Solution


Free BrainMass Quizzes
Word 2010: Table of Contents

Ever wondered where a Table of Contents in a Word document comes from? Maybe you need a refresher on the topic? This quiz will remind you of the keywords and options used when working with a T.O.C. in Word 2010.

C++ Operators

This quiz tests a student's knowledge about C++ operators.

Javscript Basics

Quiz on basics of javascript programming language.

Basic UNIX commands

Use this quiz to check your knowledge of a few common UNIX commands. The quiz covers some of the most essential UNIX commands and their basic usage. If you can pass this quiz then you are clearly on your way to becoming an effective UNIX command line user.

Excel Introductory Quiz

This quiz tests your knowledge of basics of MS-Excel.