ENGR 330: Todays Class - PowerPoint PPT Presentation

1 / 8
About This Presentation
Title:

ENGR 330: Todays Class

Description:

Make it variable base/radix. Do we want to support hex? Well, not at first. March 2005 ... Making the variable radix work. Awkward loops. March 2005. 8 ... – PowerPoint PPT presentation

Number of Views:50
Avg rating:3.0/5.0
Slides: 9
Provided by: ricks6
Category:
Tags: engr | class | radix | todays

less

Transcript and Presenter's Notes

Title: ENGR 330: Todays Class


1
ENGR 330 Todays Class
  • Administrative do you want another lab?
  • Notes on 11
  • Fundamentals of procedural programming
  • Walking through 11
  • Making a subroutine/procedure/method/...

2
Notes on 11
  • The point is to do numeric format conversion
  • BY HAND, not by relying on other software
  • Wanted to get numbers we could calculate with
  • Not what you get by converting from text decimal
    to text binary
  • Good programs are READABLE
  • I didnt push this much because I didnt give you
    formatting standards

3
Procedural Programming
  • What are the 6 things we do in a program?

4
Procedural Programming
  • What are the 6 things we do in a program?
  • Declare variables
  • Assignment statements
  • Call subroutines/procedures/functions/methods
  • Arithmetic formulas
  • If statements
  • Loops

5
Lets walk through 11
  • Declarations
  • Initializations
  • Set up the loop
  • Do the loop
  • Print the result

6
Next Assignment
  • Accumulate several typed-in numbers
  • Print the accumulated result
  • Need a function to read in the number
  • Make it variable base/radix
  • Do we want to support hex?
  • Well, not at first

7
Building the function for 12
  • Input and output declarations
  • Making the variable radix work
  • Awkward loops

8
Thats it.
  • Questions?
  • Creative Commons License
  • This work is licensed under the Creative Commons
    Attribution-Share Alike 3.0 United States
    License. To view a copy of this license, visit
    http//creativecommons.org/licenses/by-sa/3.0/us/
    or send a letter to Creative Commons, 171 Second
    Street, Suite 300, San Francisco, California,
    94105, USA.
Write a Comment
User Comments (0)
About PowerShow.com