Professional Documents
Culture Documents
Pseudocode and Flowchart Pestaño Charlotte Manipol
Pseudocode and Flowchart Pestaño Charlotte Manipol
BSCE
Step1: Start
Step 2:Enter Your Choice From Options(1-12)
Step3 : Determine the Mathematical Formula to be performed.
switch(choice){
case 1:{
Enter the Side of a Square
Display and Label the Figure of a Square
PerimeterS= 4*s
Display the Perimeter of a Square
}
break;
case 2:{
Enter the Side of a Square
Display and Label the Figure of a Square
AreaS= s*s
Display the Area of a Square
}
Break;
case 3:{
Enter the Base 1 of a Trapezoid
Enter the Base 2 of a Trapezoid
Enter the Leg 1 of a Trapezoid
Enter the Leg 2 of a Trapezoid
Display and Label the Figure of a Trapezoid
PerimeterT= b1+b2+l1+l2
Display the Perimeter of a Trapezoid
}
break;
case 4:{
Enter the Base 1 of a Trapezoid
Enter the Base 2 of a Trapezoid
Enter the Height of a Trapezoid
Display and Label the Figure of a Trapezoid
AreaT= b1+b2*H/2
Display the Area of a Trapezoid
}
break;
case 5:{
Enter the Side of a Parallelogram
Enter the Base of a Parallelogram
Display and Label the Figure of a Parallelogram
PerimeterP= a*2+b*2
Display the Perimeter of a Parallelogram
}
break;
case 6:{
Enter Base of a Parallelogram
Enter the Height of a Parallelogram
Display and Label the Figure of a Parallelogram
AreaP= b*H
Display the Area of a Parallelogram
}
break;
case 7:{
Enter the Side of a Cube
Display and Label the Figure of a Cube
VolumeC= s*s*s
Display the Volume of a Cube
}
break;
case 8:{
Enter the Side of a Cube
Display and Label the Figure of a Cube
SurfaceC= 6*s*s
Display the Surface Area of a Cube
}
break
case 9:{
Enter the Base of a Square or Triangular Pyramid
Enter the Height of a Square or Triangular Pyramid
Display and Label the Figure of a Square or Triangular Pyramid
VolumeRP= b*b*H/3
Display the Volume of a Square or Triangular Prism
}
break;
case 10;{
Enter the Side of a Square or Rectangular Pyramid
Enter the Base of a Square or Rectangular Pyramid
Display and Label the Figure of a Square or Rectangular Pyramid
SurfaceRP= 2*b*s+b*b
Display the Volume of Square or Rectangular Pyramid
}
break;
case 11:{
Enter the Width of a Rectangular Prism
Enter the Length of a Rectangular Prism
Enter the Height of a Rectangular Prism
Display and Label the Figure of a Rectangular Prism
VolumePrism= l*w*h
Display the Volume of a Rectangular Prism
}
break;
case 12:{
Enter the Width of a Rectangular Prism
Enter the Length of a Rectangular Prism
Enter the Height of a Rectangular Prism
Display and Label the Figure of a Rectangular Prism
SurfacePrism= 2*(w*H+w*l+l*H)
}
break:
default:
Display “Unknown”
}
Enter Your
Choice From
Options (1-12)
Display the
Yes Figure, label
case AreaS=s*s x
Enter the Side and ,Area of
2 x
of a Square a Square
No
Display the
Yes Enter the PerimeterT=b1 Figure, label
case base 1, base x
+b2+l1+l2 and,
3 2, leg 1, and Perimeter of
leg 2 of a a Trapezoid
Trapezoid
No
No
Display the
Yes PerimeterP=a*2
case Figure, label
Enter the side +b*2 x
5 and ,Perimeter
and base of a
of a
Parallelogram
Parallelogram
No
Display the
case Yes Enter the AreaP=b*H Figure, label x
6 base and and ,Area of a
height of a Parallelogram
Parallelogram
No
Display the
Yes Figure, label
case VolumeC=s*s*s
Enter the Side
and , x
7 Volume of a
of a Cube
Cube
No
Display the
case Yes SurfaceC=
Figure, label x
8 Enter the side 6*s*s
and ,Surface
of a Cube
Area of a
Cube
No
2
1
Display the
case Yes Enter the SurfaceRP=2*b Figure, label
*s+b*b and ,Surface
x
10 base and side
of a Square or Area of a
Rectangle Square or
Pyramid Rectangle
No Pyramid
Display the
case Yes VolumePrism=L Figure, label
Enter the
11 width,length,a *w*H and , x
nd height of a Volume of a
Rectangular Rectangular
Prism Prism
No
Display the
Enter the SurfacePrism= Figure, label
case Yes and , x
width,length,a 2*(w*H+w*l+l*H
12 nd height of a Surface
)
Rectangular Area of a
Prism Rectangular
Prism
No
default Yes x
Display
“Unknown"
No
Try Yes
Again? y
No
End