DOC PREVIEW
UNF COP 2551 - Study Notes

This preview shows page 1 out of 2 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 2 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 2 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

NO DATA DECLARATIONS IN PSEUDOCODEExample is somewhat C-like or Java-like.Example of an algorithm…. Should approach being language independent.Make all ‘reasonable’ attempts to eschew language dependencies, such asPerform, etc. Better to say, Generate, or Loop …. End-loop; Calculate, etc.Use scope terminators (if … endif. Loop, endLoop; Indentation is absolutely critical!Print out appropriate heading and make it prettyWhile not EOF do: Scan over all blanks and white space until a character is found (got first character on the line) set can't-be-ascending-flag to 0 set consec cntr to 1 set ascending cntr to 1 write first char of string to screen set read character to hold character While next character read != blanks and white space write character to screen if new char = hold char + 1 add 1 to consec cntr set hold char = new char continue endif if new char >= hold char if consec cntr < 3 set consec cntr to 1 endif set hold char = new char continue endif if new char < hold char if consec cntr < 3 set consec cntr to 1 endif set hold char = new char set can't be ascending flag to 1 continue endif end while if consec cntr >= 3 print (Appropriate message 1 and skip a line) add 1 to consec total endif if can't-be-ascending-flag = 0 print (Appropriate message 2 and skip a line) add 1 to ascending total else print (Sorry message and skip a line) add 1 to sorry total endifend WhilePrint out totals: Number of consecs, ascendings, and


View Full Document

UNF COP 2551 - Study Notes

Download Study Notes
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Study Notes and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Study Notes 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?