ITEC 320 Lecture 10 Examples
Review Strings –What types are there? –What are the differences? –What should you use where? Homework –Hardest part –Easiest part –Thoughts?
Examples Outline Usage of ADA –Variables –Conditionals –Loops –Arrays
Examples Program 1 Character counter –Input strings less than 80 characters until eof and count number of spaces. Then count number of As, Bs,...Zs (case insensitive).
Examples Program 2 Given a string, compute recursively (no loops) the number of times lowercase "hi" appears in the string.
Examples Program 3 Caesar cipher of shift 3 to the right Character’val(65); Character’pos(‘A’);
Examples Program 4 Banking simulator –Customers –Account balances –Debit / Credit account
Examples Review Writing code in ADA Process Errors How to find answers