Previous page Next page Navigation bar

Calculator Programming Tutorial

Programming Building Blocks I

Control Flow I

Control Flow Introduction Algorithm Description

In the Control Flow Introduction page, a flow chart for an algorithm to compute the factorial of a number is used as an example. The steps of this algorithm are:

  1. Start.
  2. Assign 1 to a; assign 1 to b.
  3. Test whether a is greater than n. If so, proceed to step 6.
  4. Assign the product ab to b.
  5. Assign the sum a + 1 to a. Proceed to step 3.
  6. Return b as the factorial.
  7. End.

Click here to return to the Control Flow Introduction page.

[ Previous page | Top of page | Next page ]

Previous page Top of page Next page Navigation bar

Copyright © 2001 Brian Hetrick
Page last updated 30 December 2001.

Brian’s Casio Calculator Corner

Home

Programs

Tutorial

Preface

Introduction

Fundamentals

Building Blocks I

Introduction

Comments

Data Types

Numbers

Variables

Expressions

Control Flow I

Introduction

Sequences

Alternatives

Loops

Composition

Control Flow II

Subprograms

Basic I/O

Algorithms

A First Program

Examples

Exercises

Answers

Modularization

Data Structures I

Recursion

Program Attributes

Building Blocks II

Algorithm Analysis

Structuring

Data Structures II

Abstract Types

Objects

Problem Analysis

Reference Card

References

Puzzles

Site Information

Your Privacy

Site Map

E-mail

Site Technical Data