Professional Documents
Culture Documents
Lect06 Flowchart PDF
Lect06 Flowchart PDF
Flowchart
Algorithm
Sequence of steps
which will produce the desired output
for the given input
Algorithm
Sequence of steps
which will produce the desired output
for the given input
Flowchart
Graphical representation
to the logical steps to carry out a task
and show how the steps relate to each other
if condition is true
Then
Process step(s) 1
else
Process step(s) 2
end if
if condition is true
Then
Process step(s) 1
else
Process step(s) 2
end if
switch (expression)
{
case 1:
Statement 1;
break;
switch (expression)
{
case 1:
Statement 1;
break;
case 2:
Statement 2;
break;
switch (expression)
{
case 1:
Statement 1;
break;
case 2:
Statement 2;
break;
..
.
case n:
Statement n;
break;
switch (expression)
{
case 1:
Statement 1;
break;
case 2:
Statement 2;
break;
..
.
case n:
Statement n;
break;
default:
Note that expression must return Statement;
integer constant value
}
1
f (1) = 1+
1
1
f (2) = 1+
1 + 12
1
f (3) = 1+
1 + 1+1 1
3
Thank You