You are on page 1of 49

1

Topic 3 Control Structures: Part 2

Outline
3.1
3.2
3.3
3.4
3.5
3.6
3.7
3.8
3.9

Introduction
Essentials of Counter-Controlled Repetition
for Repetition Structure
Examples Using the for Structure
switch Multiple-Selection Structure
do/while Repetition Structure
Statements break and continue
Logical and Conditional Operators
Structured-Programming Summary

2001 Prentice Hall, Inc. All rights reserved.

3.2 Essentials of Counter Controlled


Repetition
Counter controlled repetition
Control variable
The variable used to determine if the loop continues

Initial value of the control variable


Incrementing/decrementing of the variable
The condition

When the looping should continue

2001 Prentice Hall, Inc. All rights reserved.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
1
2
3
4
5

Outline

// Fig. 3.1: WhileCounter.cs


// Counter-controlled repetition.
using System;

WhileCounter.cs

class WhileCounter
This is where the counter variable
{
static void Main( string[] args
)
is initialized.
It is set to 1.
{
int counter = 1;
// initialization

The loop will continue until counter is


while ( counter <= 5 )
// repetition
greatercondition
than five (it will stop once it
{
gets to six)
Console.WriteLine( counter );
counter++;
} // end while

// increment

The counter is incremented


and 1 is added to it

} // end method Main


} // end class WhileCounter

Program Output

2001 Prentice Hall, Inc.


All rights reserved.

3.3 for Repetition Structure


The for repetition structure
Syntax: for (Expression1, Expression2, Expression3)
Expression1 = names the control variable
Can contain several variables
Expression2 = loop-continuation condition
Expression3 = incrementing/decrementing
If Expression1 has several variables, Expression3 must
have several variables accordingly
++counter and counter++ are equivalent

Variable scope

Expression1 can only be used in the body of the for loop


When the loop ends the variable expires

2001 Prentice Hall, Inc. All rights reserved.

3.3 for Repetition Structure

for keyword

Control variable name

Final value of control variable

for ( int counter = 1; counter <= 5; counter++ )


Initial value of control variable

Increment of control variable

Loop-continuation condition

Fig. 3.3

Components of a typical for header.

2001 Prentice Hall, Inc. All rights reserved.

3.3 for Repetition Structure

Establish initial value


of control variable.
Determine if final
value of control
variable has
been reached.

int counter = 1

counter <= 10

false

Fig. 3.4

true Console.WriteLine
( counter * 10 );
Body of loop (this may
be multiple statements)

Flowcharting a typical for repetition structure.

2001 Prentice Hall, Inc. All rights reserved.

counter++
Increment the
control variable.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
1
2
3
4
5

Outline

// Fig. 3.2: ForCounter.cs


// Counter-controlled repetition with the for structure.
using

This is where the counter variable


is initialized. It is set to 1.
System;
The counter is incremented
ForCounter
is addeduntil
to it)counter is
The loop will(1continue

ForCounter.cs

class
{
static void Main( string[]
args
greater than
five) (it will stop once it
{
gets to six)
// initialization, repetition condition and incrementing
// are all included in the for structure
for ( int counter = 1; counter <= 5; counter++ )
Console.WriteLine( counter );
}
}

Program Output

2001 Prentice Hall, Inc.


All rights reserved.

3.4 Examples Using the for Structure


Increment/Decrement
When incrementing
In most cases < or <= is used

When decrementing
In most cases > or >= is used

Message boxes
Buttons

OK
OKCancel
YesNo
AbortRetryIgnore
YesNoCancel
RetryCancel

2001 Prentice Hall, Inc. All rights reserved.

3.4 Examples Using the for Structure


Massages boxes
Icons

Exclamation
Question
Error
Information

Formatting
(variable : format)

Table 3.9 lists some formatting codes

2001 Prentice Hall, Inc. All rights reserved.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23

Outline

// Fig. 3.5: Sum.cs


// Summation with the for structure.
using System;
using System.Windows.Forms;

Sum.cs

class Sum
The counter. It is initialized to 2
{
static void Main( string[] args )
{
int sum = 0;

Once the number is greater


than 100 the loop breaks
Increments number by 2
every time the loop starts over

The caption of the message box

for ( int number = 2; number <= 100;


)
Thenumber
title of +=
the2message
sum += number;
MessageBox.Show( "The sum is " + sum,
"Sum Even Integers from 2 to 100",
MessageBoxButtons.OK,
MessageBoxIcon.Information );
} // end method Main

box

Displays a message box with an OK button


Has the message box contain
an information icon

} // end class Sum

Argument 4:
MessageBoxIcon
(Optional)

Argument 3: OK
dialog button.
(Optional)

Argument 2: Title bar


string (Optional)

Program Output

Argument 1:
Message to display

2001 Prentice Hall, Inc.


All rights reserved.

10

11

3.4 Examples Using the for Structure


MessageBox Icons
MessageBoxIcon.Exclamation

Icon

MessageBoxIcon.Information

MessageBoxIcon.Question
MessageBoxIcon.Error

Fig. 5.6

Icons for message dialogs.

2001 Prentice Hall, Inc. All rights reserved.

Description
Displays a dialog with an
exclamation point. Typically
used to caution the user against
potential problems.
Displays a dialog with an
informational message to the
user.
Displays a dialog with a question
mark. Typically used to ask the
user a question.
Displays a dialog with anxin a
red circle. Helps alert user of
errors or important messages.

12

3.4 Examples Using the for Structure

MessageBox Buttons

Description

MessageBoxButton.OKCancel

Specifies that the dialog should include OK and Cancel


buttons. Warns the user about some condition and allows
the user to either continue or cancel an operation.

MessageBoxButton.YesNo

Specifies that the dialog should contain Yes and No


buttons. Used to ask the user a question.

MessageBoxButton.YesNoCancel

Specifies that the dialog should contain Yes, No and


Cancel buttons. Typically used to ask the user a question
but still allows the user to cancel the operation.

MessageBoxButton.RetryCancel

Specifies that the dialog should contain Retry and Cancel


buttons. Typically used to inform a user about a failed
operation and allow the user to retry or cancel the operation.

MessageBoxButton.AbortRetryIgnore

Specifies that the dialog should contain Abort, Retry and


Ignore buttons. Typically used to inform the user that one
of a series of operations has failed and allow the user to
abort the series of operations, retry the failed operation or
ignore the failed operation and continue.

MessageBoxButton.OK

Fig. 5.7

Buttons for message dialogs.

2001 Prentice Hall, Inc. All rights reserved.

Specifies that the dialog should include an OK button.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31

Outline

// Fig. 3.8: Interest.cs


// Calculating compound interest.
using System;
using System.Windows.Forms;

Interest.cs

class Interest
{
static void Main( string[] args )
Loops through 10 times
{
decimal amount, principal =starting
( decimal
) 1000.00;
at 1 and
ending at 10,
double rate = .05;
adding 1 to the counter (year)
string output;

each time

output = "Year\tAmount on deposit\n";

Formats amount to have a

for ( int year = 1; year <= 10; year++ )


currency formatting ($0.00)
{
amount = principal *
( decimal ) Math.Pow( 1.0 + rate, year );

Insert a Tab
}

Creates a message box that displays the


output += year + "\t" +
output with a title of Compound Interest
String.Format( "{0:C}", amount ) + "\n";
has an OK button and an information icon

MessageBox.Show( output, "Compound Interest",


MessageBoxButtons.OK, MessageBoxIcon.Information );
} // end method Main
} // end class Interest

2001 Prentice Hall, Inc.


All rights reserved.

13

Outline
Interest.cs
Program Output

2001 Prentice Hall, Inc.


All rights reserved.

14

15

3.4 Examples Using the for Structure


Format Code

Description

D or d

Formats the string as a decimal. Displays number as an integer.

N or n

Formats the string with commas and two decimal places.

E or e

Formats the number using scientific notation with a default of six decimal places.

F or f

Formats the string with a fixed number of decimal places (two by default).

G or g

General. Either E or F.

X or x

Formats the string as hexadecimal.

C or c

Fig. 5.9

Formats the string as currency. Precedes the number with an appropriate currency
symbol ($ in the US). Separates digits with an appropriate separator character
(comma in the US) and sets the number of decimal places to two by default.

string formatting codes.

2001 Prentice Hall, Inc. All rights reserved.

16

3.5 switch Multiple-Selection Structure


The switch statement
Constant expressions
String
Integral

Cases
Case x :
Use of constant variable cases
Empty cases
The default case

The break statement

Exit the switch statement

2001 Prentice Hall, Inc. All rights reserved.

Outline

1
// Fig. 3.10: SwitchTest.cs
2
// Counting letter grades.
3
4
using System;
SwitchTest.cs
5
6
class SwitchTest
7
{
8
static void Main( string[] args )
9
{
10
char grade;
// one grade
A
for
loop
that
initializes
1, loops
11
int aCount = 0, //i to
number
of 10
As
Each of these variables acts as a
12
bCount
=
0,
//
number
of
times and increments i by one each time Bs
13
cCount = 0, // number of Cs
counter so they are initialized to zero
14
dCount = 0, // number of Ds
Prompt the user for a grade and
15
fCount = 0; // number of Fs
16
store it into the grade variable
17
for ( int i = 1; i <= 10; i++ )
18
{
start of the switch
19
Console.Write( "Enter a letter grade:The
" );
20
grade = Char.Parse( Console.ReadLine()
);
statement.
The grade variable is
21 Both cases add one to aCount
used as the data to be tested for
22
switch ( grade )
each
23
{
casecase.
A is empty so it is the
24
case 'A':
// grade is uppercase A
same as case a
25
case 'a':
// or lowercase a
26
++aCount;
The break statement is used to exit the
27
break;
switch statement and not perform the rest
28
29
case 'B':
// grade is uppercase of
B the operations
30
case 'b':
// or lowercase b
31
++bCount;
Both case B and case b add one to
32
break;
the bCount variable
33

2001 Prentice Hall, Inc.


All rights reserved.

17

34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66

Outline

case 'C':
// grade
uppercase
Bothiscases
add 1 toCcCount
case 'c':
// or lowercase c
++cCount;
break;
case 'D':
// grade is uppercase D
case 'd':
// or lowercase
d
If grade
equals D or
++dCount;
add one to dCount
break;
case 'F':
// grade is uppercase F
case 'f':
// or lowercase
f one to
Add
++fCount;
break;

SwitchTest.cs
d

fCount if grade equals F or f

If non of the cases are equal to the value of


default:
// processes all other characters
Console.WriteLine(
grade then the default case is executed
"Incorrect letter grade entered." +
"\nGrade not added to totals." );
break;
} // end switch

Display the results

} // end for
Console.WriteLine(
"\nTotals for each letter grade are:\nA: {0}" +
"\nB: {1}\nC: {2}\nD: {3}\nF: {4}", aCount, bCount,
cCount, dCount, fCount );
} // end method Main
} // end class SwitchTest

2001 Prentice Hall, Inc.


All rights reserved.

18

Enter a letter grade: a


Enter a letter grade: A
Enter a letter grade: c
Enter a letter grade: F
Enter a letter grade: z
Incorrect letter grade entered.
Grade not added to totals.
Enter a letter grade: D
Enter a letter grade: d
Enter a letter grade: B
Enter a letter grade: a
Enter a letter grade: C

Outline
SwitchTest.cs
Program Output

Totals for each letter grade are:


A: 3
B: 1
C: 2
D: 2
F: 1

2001 Prentice Hall, Inc.


All rights reserved.

19

20

3.5 switch Multiple-Selection Structure


case: a

true

case a action(s)

break;

case b action(s)

break;

case z action(s)

break;

false
case: b

true

false
.
.
.

case: z

true

false
default action(s)
break;

Fig. 3.11 Flowcharting the switch multiple-selection structure.

2001 Prentice Hall, Inc. All rights reserved.

TASK
This program takes 2 number as input using ReadLine ()
function. As we have said earlier, ReadLine () function only
takes input as string datatype. So, to calculate real numbers we
need to use datatype such as double, float etc.
To convert to double we can use the ToDouble () function and to
convert to float use ToSingle () function.
Then we have to take another input that is the operator. Because
we have to specify which type of operation we want to perform.

If we give operator input anything except +,-,*,/ then we are


showing an error message: Invalid Operator!
2001 Prentice Hall, Inc. All rights reserved.

21

22

SOLUTION

2001 Prentice Hall, Inc. All rights reserved.

23

2001 Prentice Hall, Inc. All rights reserved.

24

3.6 do/while Repetition Structure


The while loops vs. the do/while loops
Using a while loop
Condition is tested
The the action is performed
Loop could be skipped altogether

Using a do/while loop

Action is performed
Then the loop condition is tested
Loop must be run though once
Always uses brackets ({) to prevent confusion

2001 Prentice Hall, Inc. All rights reserved.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
1
2
3
4
5

Outline

// Fig. 3.12: DoWhileLoop.cs


// The do/while repetition structure.
using System;

DoWhileLoop.cs

class DoWhileLoop
{
static void Main( string[] args )
{
int counter = 1;

The counter is initialized to one

do
{
Console.WriteLine( counter );
counter++;
} while ( counter <= 5 );
} // end method Main

The incrementing task

} // end class DoWhileLoop

These actions are performed at least one

Continue looping as long as counter is less than 6

Program Output

2001 Prentice Hall, Inc.


All rights reserved.

25

26

3.6 do/while Repetition Structure

action(s)

true
condition

false

Fig. 3.13 Flowcharting the do/while repetition structure.

2001 Prentice Hall, Inc. All rights reserved.

27

3.7 Statements break and continue


Use
Used to alter the flow of control
The break statement
Used to exit a loop early

The continue statement


Used to skip the rest of the statements and begin the loop at the
first statement in the loop

Programs can be completed without their usage

2001 Prentice Hall, Inc. All rights reserved.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31

Outline

// Fig. 3.14: BreakTest.cs


// Using the break statement in a for structure.
using System;
using System.Windows.Forms;

BreakTest.cs

class BreakTest
{
static void Main(
) goes
A loopstring[]
that startsargs
at one,
{
to ten, and increments by one
string output = "";
int count;
for ( count = 1; count <= 10; count++ )
{
if ( count == 5 )
If //
count
= 5remaining
then breakcode
out of
loop
break;
skip
inthe
loop
Displays a message
// if count == 5

Display the last value that the


counter was output
at before
broke +
+=itcount
} // end for loop

" ";

box the displays the


output, has a title of demonstrating the
break statement, uses an OK button,
and displays an information icon

output += "\nBroke out of loop at count = " + count;


MessageBox.Show( output, "Demonstrating the break statement",
MessageBoxButtons.OK, MessageBoxIcon.Information );
} // end method Main
} // end class BreakTest

2001 Prentice Hall, Inc.


All rights reserved.

28

Outline
BreakTest.cs
Program Output

2001 Prentice Hall, Inc.


All rights reserved.

29

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29

Outline

// Fig. 3.13: ContinueTest.cs


// Using the continue statement in a for structure.
using System;
using System.Windows.Forms;

ContinueTest.cs

class ContinueTest
A loop that starts at 1, goes
{
to 10, and increments by 1
static void Main( string[] args )If count = 5 then continue looping causing
{
the program to skip the rest of the loop
string output = "";
for ( int count = 1; count <= 10; count++ )
{
if ( count == 5 )
Create
a message
box that
the output, has
continue;
// skip
remaining
codedisplays
in loop
only
if count
== 5 statement, uses an
the//title
using
the continue

OK button, and displays an information icon.

output += count + " ";


}

output += "\nUsed continue to skip printing 5";


MessageBox.Show( output, "Using the continue statement",
MessageBoxButtons.OK, MessageBoxIcon.Information );
} // end method Main
} // end class ContinueTest

2001 Prentice Hall, Inc.


All rights reserved.

30

Outline
ContinueTest.cs
Program Output

2001 Prentice Hall, Inc.


All rights reserved.

31

32

3.8 Logical and Conditional Operators


Operators

Logical AND (&)


Conditional AND (&&)
Logical OR (|)
Conditional OR (||)
Logical exclusive OR or XOR (^)
Logical NOT (!)
Can be avoided if desired by using other conditional operators

Used to add multiple conditions to a statement

2001 Prentice Hall, Inc. All rights reserved.

33

3.8 Logical and Conditional Operators


expression1
false
false
true
true
Fig. 5.16

Fig. 5.17

expression1 &&
expression2
false
false
false
true

false
true
false
true
Truth table for the && (logical AND) operator.

expression1
false
false
true
true

expression2

expression2

expression1 ||
expression2
false
true
true
true

false
true
false
true
Truth table for the || (logical OR) operator.

2001 Prentice Hall, Inc. All rights reserved.

34

3.8 Logical and Conditional Operators


expression1
false
false
true
true
Fig. 5.18

expression2

expression1 ^
expression2
false
false
true
true
false
true
true
false
Truth table for the logical exclusive OR (^) operator.

expression
false
True

Fig. 5.19

!expression
true
false

Truth table for operator! (logical NOT).

2001 Prentice Hall, Inc. All rights reserved.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30

Outline

// Fig. 3.20: LogicalOperators.cs


// Demonstrating the logical operators.
using System;

LogicalOperators.cs
class LogicalOperators
Outputs a truth table for the
{
// main entry point for application
conditional AND operator (&&)
static void Main( string[] args )
{
// testing the conditional AND operator (&&)
Console.WriteLine( "Conditional AND (&&)" +
"\nfalse && false: " + ( false && false ) +Only true if both inputs are true
"\nfalse && true: " + ( false && true ) +
"\ntrue && false: " + ( true && false ) +
"\ntrue && true:
" + ( true && true ) );
// testing the conditional OR operator (||)
Console.WriteLine( "\n\nConditional OR (||)" +
"\nfalse || false: " + ( false || false ) +
"\nfalse || true: " + ( false || true ) +
"\ntrue || false: " + ( true || false ) +
"\ntrue || true:
" + ( true || true ) );
// testing the logical AND operator (&)
Console.WriteLine( "\n\nLogical AND (&)" +
"\nfalse & false: " + ( false & false ) +
"\nfalse & true: " + ( false & true ) +
"\ntrue & false: " + ( true & false ) +
"\ntrue & true:
" + ( true & true ) );

Outputs a truth table for the


conditional OR operator (||)
Only false if both inputs are false
Outputs a truth table for the
logical AND operator (&)

The result is only true if both are true

2001 Prentice Hall, Inc.


All rights reserved.

35

31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50

// testing the logical OR operator (|)


Console.WriteLine( "\n\nLogical OR (|)" +
"\nfalse | false: " + ( false | false ) +
"\nfalse | true: " + ( false | true ) +
"\ntrue | false: " + ( true | false ) +
"\ntrue | true:
" + ( true | true ) );

Outputs a truth table forOutline


the
logical OR operator (||)
LogicalOperators.cs
If one is true the result is true

// testing the logical exclusive OR operator (^)


Console.WriteLine( "\n\nLogical exclusive OR (^)" + Outputs a truth table for the
"\nfalse ^ false: " + ( false ^ false ) +
logical exclusive OR operator
"\nfalse ^ true: " + ( false ^ true ) +
(||)
Returns
false when the two
"\ntrue ^ false: " + ( true ^ false ) +
"\ntrue ^ true:
" + ( true ^ true ) );
conditionals are the same
// testing the logical NOT operator (!)
Console.WriteLine( "\n\nLogical NOT (!)" +
"\n!false: " + ( !false ) +
"\n!true: " + ( !true ) );
}

Returns the opposite as the input

Conditional AND
false && false:
false && true:
true && false:
true && true:

Outputs a truth table for the


logical NOT operator (!)

(&&)
False
False
False
True

Conditional OR (||)
false || false: False
false || true: True
true || false: True
true || true:
True

Program Output

2001 Prentice Hall, Inc.


All rights reserved.

36

Logical AND (&)


false & false: False
false & true: False
true & false: False
true & true:
True
Logical OR (|)
false | false:
false | true:
true | false:
true | true:

Outline
LogicalOperators.cs
Program Output

False
True
True
True

Logical exclusive OR (^)


false ^ false: False
false ^ true: True
true ^ false: True
true ^ true:
False
Logical NOT (!)
!false: True
!true: False

2001 Prentice Hall, Inc.


All rights reserved.

37

38

3.9 Structured Programming Summary


Control Structures

Only one entrance


Only one exit
Building blocks to programming
Allow nesting
Makes code neater and easier to follow
No overlapping structures

The goto keyword

2001 Prentice Hall, Inc. All rights reserved.

39

3.9 Structured Programming Summary


3 forms of control necessary
Many ways to implement these controls
Sequential (only 1 way)
Straight forward programming

Selection (3 ways)
if selection (one choice)
if/else selection (two choices)
switch statement (multiple choices)

Repetition (4 ways)

while structure
do/while structure
for structure
foreach structure (chapter 7)

2001 Prentice Hall, Inc. All rights reserved.

40

3.9 Structured Programming Summary


Operators

Associativity

Type

()
++ -++ -- + - ! (type)

left to right
right to left
right to left

parentheses
unary postfix
unary prefix

left to right

multiplicative

left to right

additive

<

<= >

left to right

relational

== !=

left to right

equality

&

left to right

logical AND

left to right

logical exclusive OR

left to right

logical inclusive OR

&&

left to right

conditional AND

||

left to right

conditional OR

?:

right to left

conditional

right to left

assignment

>=

+= -= *= /= %=

Fig. 5.21 Precedence and associativity of the operators discussed so far.

2001 Prentice Hall, Inc. All rights reserved.

41

3.9 Structured Programming Summary


Sequence

.
.

Fig. 3.22 C#s single-entry/single-exit sequence, selection and repetition structures. (part 1)

2001 Prentice Hall, Inc. All rights reserved.

42

3.9 Structured Programming Summary


switch structure
(multiple selections)

Selection
else/if structure
(double selection)
T

break

F
T

break

.
.
if structure
(single selection)
T

break

F
break

Fig. 3.22 C#s single-entry/single-exit sequence, selection and repetition structures. (part 2)

2001 Prentice Hall, Inc. All rights reserved.

43

3.9 Structured Programming Summary


Repetition
for structure/foreach structure

while structure
T
F

T
do/while structure

T
F

Fig. 3.22 C#s single-entry/single-exit sequence, selection and repetition structures. (part 3)

2001 Prentice Hall, Inc. All rights reserved.

44

3.9 Structured Programming Summary


Rules for Forming Structured Programs
1) Begin with the simplest flowchart (Fig. 5.24).
2) Any rectangle (action) can be replaced by two rectangles (actions) in sequence.
3) Any rectangle (action) can be replaced by any control structure (sequence, if,
if/else, switch, while, do/while, for or foreach, as we will see in
Chapter 8, Object-Oriented Programming).
4) Rules 2 and 3 may be applied as often as you like and in any order.

Fig. 5.23

Rules for forming structured programs.

2001 Prentice Hall, Inc. All rights reserved.

45

3.9 Structured Programming Summary

Fig. 3.24 Simplest flowchart.

2001 Prentice Hall, Inc. All rights reserved.

46

3.9 Structured Programming Summary

Rule 2

Rule 2

Rule 2

.
.
.

Fig. 3.25 Repeatedly applying rule 2 of Fig. 3.23 to the simplest flowchart.

2001 Prentice Hall, Inc. All rights reserved.

47

3.9 Structured Programming Summary


Rule 3

Rule 3

Fig. 3.26 Applying rule 3 of Fig. 3.23 to the simplest flowchart.

2001 Prentice Hall, Inc. All rights reserved.

48

3.9 Structured Programming Summary

Stacked building blocks

Nested building blocks

Overlapping building blocks


(illegal in structured programs)

Fig. 3.27 Stacked, nested and overlapped building blocks.

2001 Prentice Hall, Inc. All rights reserved.

49

3.9 Structured Programming Summary

Fig. 3.28 Unstructured flowchart.

2001 Prentice Hall, Inc. All rights reserved.

You might also like