CS225,  Fall 2006, Wednesday Oct. 11, Day 20 Hit reload! After class

(Re) Read Ch. 6.2, Branching and flow of control

Take-home midterm handed out today, Oct 11 (day 20) due the following Wednesday.  Through If/Else.
I will be basing "6-week grades" on the HW I  have received today Oct 11 at the beginning of class.
Beginning code for problem 9 Midtermfile.htm

HW Day 20,
Due Fri Day 21 

Textbook p. 318,      #12 (Write a while loop)   (From Day 15HW) 
A. (Another loop) Write a program which gets character input from the keyboard, and prints *? as long as the input is not "y".  When it gets "y", it prints !! and quits.  (Do this with batch input first.  Then after it works, try it with interactive I/O.  Any new difficulties?)  Input abcy, output *?*?*?!!.  Interactive, things will be interspersed.  EXTRA CREDI:T:  Count how many characters are input before the y, output that number last  (for abcy, 3).  Do it WITHOUT using the X register.
Textbook p. 318, #15 (Write a "for" loop.  You may use "global" variables and direct addressing, or "local" variables and stack-relative addressing.  )

Think about Program 5 (not assigned yet)
D next time).  Think about how to multiply a number by a 4-bit number, in binary.  Come in with a pseudocode or flowcharted algorithm. (With or without a loop, your choice.)
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =

Notes:  Homework questions?

   Loops:  While, Do while, For  Handout.
       The loop examples from the text
      p. 247,
Fig. 6.10, while.
Start problem A for HW. 

      p. 249, Fig 6.11, do while. 
      p. 251, Fig 6.12, for  (with stack)

How to multiply whole numbers?   (We will program this.)


To Sievers Home Page
CS225-Fall06/Day20.htm 
1pm, 10/10/06
This page belongs to Sally Sievers who is solely responsible for its content. Please see our statement of responsibility.