การเขียน Flowchart
-
Upload
pinnoii-pin -
Category
Documents
-
view
3.188 -
download
0
Transcript of การเขียน Flowchart
�������������������������� �������� ������
Basic Basic FlowchartingFlowcharting
������������������������(Flowcharting)(Flowcharting)� ���� !"��#$� �%� &��" �'�&()*�+���������,-�.��" ,/�
������-0��%� &��!"��1�2345�678.3/�59�/����������'9����
� ������������ �-0����#)��'�/%*�"����+:'�&;/�:������ ������������ �-0����#)��'�/%*�"����+:'�&;/�:�����*<�%��=!8���+!���>)+��>-1�2!� �345�678
� >������,-�.��":=3�"��#����+:59�/���������������,-�.��";/���)���*/��?*.5=�)���$�� .5=�)���)������*:3��%*�"#>��������59�/�������+�*<@����-�="*55
������������������������(Flowcharting)(Flowcharting)� ���'A�(�</'�&"����*<�%��=!8�-0�59�/�������.5�* ���
3�"��#�9�"����������;/� ."���='&����'�&���&�*������(�*<�-�=:9�*����������
�*��)������'&*;-�*��)������'&*;-((11//33))� .3/����,���!���4 3
%��� #�����!* >�,��:=;/���<� 10 ��' #��������� >�,��:=�3����<� ���� >�,��:=�3����<� 10 ��' 1010
3?
�*��)������'&*;-�*��)������'&*;-((22//33))� ����.3/�����/<�
���"#��'�&"�344�7;G:��:�
�*��)������'&*;-�*��)������'&*;-((33//33))� ����2<:��7����+(���
��"H5����'�&-I/�����*/ .����"���/���+(�/����� ���A�&9��*)� 5 -K !��"
5
58
1���A�&9��*)� 5 -K !��"��-�='��
� ���A 5 -7-K %���5= 1 �"?/� ���A 8-14-K %���5= 2 �"?/� ���A 15 -K�$��;- %���5= 3
�"?/
8
815
2
3
����'��%�"2<*����8�����'��%�"2<*����8�����'��%�"2<*����8.�)�����-0� 2 -�=�1'
;/�.�)������=�� (System flowchart)�����,-�.��" (Program flowchart)
�����=�������=��(System flowchart)(System flowchart)� �-0�����'�&+(�.3/����������'9��������=�������)��
�*��� W '���=�� ,/�.3/�+!��!?�#$�%*�"3"2�@8���3)*�39�%4�)�� W +��=�����
� �()� ���3���� ������ !� �3 &���'$�'�&+(���>)�-0��=;� .5=� �()� ���3���� ������ !� �3 &���'$�'�&+(���>)�-0��=;� .5=)��;-��!�)*����+/ "��<:���"�=;�+�!�)*������� W .5�*3)��)�;-��!�)*����+/ �-0����
� /���� �����=�� :=���&�*������ %� *3/A .5=�%� &��:�� ,/�.3/�����9����">5���� -�="*55 .3/�552@8 *)�"�:��'�&+/�*��� W
�*��)�������=���*��)�������=��� ����.3/����%9��*7
2 ��'�&3�"�!5�&�":9��*� 100 �>-
100
����,-�.��"����,-�.��"(Program flowchart)(Program flowchart)� �-0�����'�&.3/����������%9�3&�'�&+(�+�,-�.��"� �������.���)��"�:�������=�� ,/�>������,-�.��":=
/$����.�)5=:A/'�&���&�*���������-�="*55+�%�"2<*����8'�&-���X+������=��"������.3/����5=����/+����'�&-���X+������=��"������.3/����5=����/+����-�="*55��)���-0�59�/������� �2 &��9�;--�=�����������,-�.��"�)�;-
�*��)������,-�.��"�*��)������,-�.��"� ����.3/����%9��*7
2 ��'�&3�"�!5�&�":9��*� 100 �>-
= 0. 5 * *
100
�-�����'��������=��.5=����,-�.��"�-�����'��������=��.5=����,-�.��"
100
= 0. 5 * *
�����=��
100
����,-�.��"
-�=,�(�8���������������-�=,�(�8���������������� ���3�"��#������>�.5=����+:����;/��)�� �2��=����;")�$����>)��
1�6�%�"2<*����81�6�+/1�6�!�$&�� �����-0����3 &�%*�"!"��/�*�1�2 '9�+!��)��.5=3=/*��)����
2<:��7�59�/�������+����'9����/��*)�����������-0��*��6�()*�+!����%��!�%*�"</25�/���59�/����'9����;/��*/��?* .5=� ()*�+!����%��!�%*�"</25�/���59�/����'9����;/��*/��?* .5=3�"��#.��;�;/��)��
� ��������,-�.��",/�2<:��7�:������ 3�"��#'9�;/��*/��?*.5=�)���$��
� +�����9��A���6�,-�.��" !� �"�����-5�&��.-5�.��;�,-�.��"+!�"�-�=3<'@<1�2 #��/>:������:=()*�+!�3�"��#'�'*����'9����+�,-�.��";/��)���$��
���:9��/������������������:9��/���������������� ������������;")�!"�=�����'�&"�*<@����Y�Y��� �()�
"����'�&�� &��;�+����'�3��"��"�� Y$&�"�:=+(�����������/3<�+:(decision table) ����"�()*�"���*)�
345�678+�������������345�678+�������������((11//1313))� �������������-0�����9����1�2345�678�)�� W
"�������)��� �2 &�.3/�59�/����������'9���� ,/�"��3��5>�\��( &�"�=!*)��1�2�)��W 345�678+�������������'�&�<�"+(������ �-0�� 345�678+�������������'�&�<�"+(������ �-0�345�678���!�)*����'�&( &�*)� American National Standard Institute (ANSI) .5= International Standard Organization (ISO) �-0�>��9�!�/.5=�*��*"+!��-0�345�678"���c��+�������������
345�678+�������������345�678+�������������((22//1313))345�678� %*�"!"�� �*��)�����+(� %9��@<���
�����<&"���!� �3<��3A/������������
1. ��<&"�������
2. :�����
START
STOP(Terminal)�����">5!� �.3/����">5,/�;")�=�A3 &�(Input/output)
1. ��%)�+3)+��*.-�( &� name
2. .3/�%)�:���*.-� area
read name
display area
345�678+�������������345�678+�������������((33//1313))345�678� %*�"!"�� �*��)�����+(� %9��@<���
���-�="*55(Process)
1. %9��*7 A + B .5=��?�;*�+� C
2. �9�!�/%)� sum �')���
C = A + B
Sum = 0�')��� 0
����-�����'���!� ��*3<�+:(Compare / Decision)
�-�����'���#�� i "�%)������*)�!� ��')��� 10
-�-0�:�<� 2<"28%)� i �3�?:.5�*;-'9�%9�3&�� &� W
-�-0��'?: ;-'9�%9�3&�� &� W
i <= 10
true
false
i
345�678+�������������345�678+�������������((44//1313))345�678� %*�"!"�� �*��)�����+(� %9��@<���
���.3/�552@8�'���%� &��2<"28(Document)
2<"28%)� A '���%� &��2<"28�print A
���.3/�552@8�'��:�1�2(Display)
.3/�%)� A, B ��:�1�2
display A , B
345�678+�������������345�678+�������������((55//1313))345�678� %*�"!"�� �*��)�����+(� %9��@<���
!"���!�A�(Comment) read A A = Age
��%)�'������/.-l�2<"28�(Manual Input)
��%)� A '��.-l�2<"28�
read A
345�678+�������������345�678+�������������((66//1313))345�678� %*�"!"�� �*��)�����+(� %9��@<���
����9�!�/%)��)��W ;*�5)*�!���(Preparation)
�9�!�/+!� i "�%)��')���1 .5=�2<&"%)�'�5= 1
:�"�%)��-0� 100 :$����:�����'9����Y�9�
for i =1 to 100
sum = sum + i
,/�.�)5=��� �*�%)� sum /�*�%)� i
.3/�'<\'��.5=59�/�������'9����(Flow line)
i
345�678+�������������345�678+�������������((77//1313))345�678� %*�"!"�� �*��)�����+(� %9��@<���
:A/�)��� &��+�!����/��*��(In-Page
!5�:��2<"28%)� A .5�*+!�'9���"'�&:A/�)��� &�� A Y$&���>)+�
A
write A
connector) !����/��*��
:A/�)��� &��'�&��>)%�5=!���(Off-Page Connector)
!5�:���9�!�/%)� A�')��� 3 +!�'9���":A/�)��� &��( &� 1 Y$&�;");/���>)+�!����/��*��
A
A = 3
1
345�678+�������������345�678+�������������((88//1313))345�678� %*�"!"�� �*��)�����+(� %9��@<���
�����!� �.3/����">5,/�+(�����:�=�>
1. �)��%)� A '�&����:�=�> 1 +�
2. �:�=%)� B,C
read A
punch B , C(Punch card) 2. �:�=%)� B,C
����� 1 +�
(A/�������:�=�>(Card Desk)
�:�=%)� B1 , B2 , Bn ����� n +�
punch B , C
punch bi b=1 ,…n
345�678+�������������345�678+�������������((99//1313))345�678� %*�"!"�� �*��)�����+(� %9��@<���
�����!� �.3/����">5,/�+(��'-��=/�6
�)��%)� ID , name ���'-��=/�6read ID ,
name
(Punched tape)�����!� �.3/����">5,/�+(��'-.")�!5?��-0�3 &�(Magnatic tape)
345�678+�������������345�678+�������������((1010//1313))345�678� %*�"!"�� �*��)�����+(� %9��@<���
�����!� �.3/����">5,/�+(�:��.")�!5?��-0�3 &�(Magnatic disk)�����!� �.3/����">5,/�+(�/�".")�!5?��-0�3 &�(Magnatic drum)
345�678+�������������345�678+�������������((1111//1313))345�678� %*�"!"�� �*��)�����+(� %9��@<���
���'9����'�&�9�!�/;*�.5�* �()� ,-�.��"�)��
�����,-�.��"�)��( &� findGrade +!�'9����
findGrade
(Predefine Process)���%*�%A"���'9����/�*�"�A6�8 ���%�����������'9����.����G;5�8 (Offline Processing)
345�678+�������������345�678+�������������((1212//1313))345�678� %*�"!"�� �*��)�����+(� %9��@<���
���'9����.����G;5�8����A-��78'�&;");/�#>�%*�%A":��!�)*�-�="*55�5��,/����(Auxiliary Operation)
���:/�����59�/����">5(Sorting)
345�678+�������������345�678+�������������((1313//1313))345�678� %*�"!"�� �*��)�����+(� %9��@<���
���3)����">5'��3��3 &�3��(Communication Link)
!5����:/1�2����!5����:/1�2����((11//22))� '<\'���������:=��<&"
:��3)*������!�����=/�65�"���3)*�5)�� .5=:��Y���" �;-���!�����=/�6 .5=
START
read age
false
��
'<\'������3��
;-���!�����=/�6 .5=%*�������%� &��!"��5>�\��9���'<\'��;*�/�*�
STOP
age > 60
“You are old”
true
false
5)��
!5����:/1�2����!5����:/1�2����((22//22))� 345�678!� �1�2'�&+(�
+�������������"����/�)�� W ��;/� .�)�:=����"��>-"���c����"%*�"!"��'�&�9�!�/
START
sum = 0
i = 1 to 10
�� ����������������������������� !���%*�"!"��'�&�9�!�/ sum = sum + i
i
sum
STOP
� !�������������
!5����:/1�2����!5����:/1�2����((33//22))� ��������'<\'���������%*��-0�;-��)��"��=�����
.5=!5���5�&�������/,��;-,��"�+�'<\'���/�� #��:9��-0�����,��#$��� %*�+(��%� &��!"��:A/�)��� &��.'�.5=#���-0�;-;/�%*����������+!�:�+�!����/��*��
� %9��@<���+�1�2 ������2���3�� W .5=����+:�)��� ����'�&/�%*�:="�%*�"�-0��=��������������.5=
3=��/ ���:�����.5�* :="�( &�������� >������ *�'�&����� .5=�5�!���59�/�
�>-.���������������>-.��������������� .����"59�/� (Sequence)� .������5 ��/�/3<�+:/�� &��;�
(Selection/Decision/Condition)� .��*�Y�9� (Iteration / Loop)
�>-.����"59�/��>-.����"59�/�((11//33))� �-0��>-.����������,-�.��"'�&�)��'�&3A/ '9����'�5=��)��
:����5�5)�� .3/�59�/����'9����:����5�5)����"5>�\�
1
2
3
�>-.����"59�/��>-.����"59�/�((22//33))START
A = 5
B = 3
��<&"���
�9�!�/%)��*.-� A "�%)��-0� 5
�9�!�/%)��*.-� B "�%)��-0� 3
STOP
C = A + B
print C
�9�!�/%)��*.-� B "�%)��-0� 3
���%)� A �*��� B .5�*��?�;*�+� C
2<"28%)� C
:����'9����
�>-.����"59�/��>-.����"59�/�((33//33))
��<&"���
�����">5"���?�;*�+��*.-� A, B '��.-l�2<"28�
START
A , B
���%)� A �*��� B .5�*��?�;*�+� C
2<"28%)� C
:����'9����STOP
C = A + B
print C
�*��)��������������.����"59�/��*��)��������������.����"59�/�� :������,-�.��"%9��*7%)�;GGl� ,/���%)�"<����8:9��*����+(�
;GGl�����/ ��'�&.5�* .5=%)�"<����8���+(�;GGl�����/ ��-u::A�� %9��*7%)�;GGl� ,/�%</���� 2.5 ��' /1 !�)*�"<����8
1. 3<&�'�&,:'�8�������%)�;GGl�
2. �>-.��552@8�
-l���5�"<����8�/ ��'�&.5�* --> <�����5�"<����8�/ ��'�&.5�*>-l���5�"<����8�/ ��-u::A��--> <�����5�"<����8�/ ��-u::A��>-----------------------------------------------------:9��*�!�)*�;GGl�'�&+(� : <.3/�:9��*�!�)*�;GGl�'�&+(�>%)�;GGl� : <.3/�%)�;GGl�>
�*��)��������������.����"59�/��*��)��������������.����"59�/�3. ���">5�9�����
� �5�"<����8�/ ��'�&.5�*� �5�"<����8�/ ��-u::A��
4. �*.-�'�&+(�+����-�="*55� Last_meter .'� �5�"<����8�/ ��'�&.5�*� Curr_meter .'� �5�"<����8�/ ��-u::A��� Num_meter .'� :9��*�!�)*�"<����8'�&+(��� Electric_fee .'� %)�;GGl�
�*��)��������������.����"59�/��*��)��������������.����"59�/�5. ������*<@����-�="*55
1. ��<&"���2. ��%)�+3)�*.-� last_meter .5= curr_meter :��>�+(�'��.-l�2<"28�3. %9��*7 num_meter = curr_meter y last_meter4. %9��*7 electric_fee = num_meter * 2.55. .3/�%)� num_meter , electric_fee6. :����'9����
Flow chartFlow chartSTART
Last_meter , Curr_meter
STOP
Num_meter = Curr_meter – Last_meter
Electric_fee = Num_meter * 2.5
Num_meter , Electric_fee
.������5 ��.������5 ���-0���������,-�.��".��"�����-�����'����� &��;� .5=
'9������"%9�3&���)��+/��)��!�$&���"�� &��;�'�&�9�!�/ 5:������-�����'����� &��;� :=+!�552@8�-0�:�<�!� ��'?: #��5�-0�:�<� +!�'9������"%9�3&�/���'�&�� &��;��-0�:�<� #���-0��'?:+!�'9���"%9�3&�/���'�&�� &��;��-0��'?:
� .��'���5 ���/��* (IF -THEN)� .��3��'���5 �� (IF y THEN -ELSE)� .��!5��'���5 �� (IF y THEN y ELSE IF | CASE)
.��'���5 ���/��*.��'���5 ���/��*((11//55))
��������
�� ����
����
����
��������
�� ���� 1
����
������ ����
�������������
����
�������������
�� ���� 2
.��'���5 ���/��*.��'���5 ���/��*((22//55))START
read age
false
��<&"���
��%)�+3)�*.-� age
�-�����'���%)� age "���*)� 60
STOP
age > 60
“You are old”
true
false
#���-0�:�<� 2<"28���%*�" You are old#���-0��'?: ;")����'9��=;�
:����'9����
�-�����'���%)� age "���*)� 60
.��'���5 ���/��*.��'���5 ���/��*((33//55))��%)� �!3)��:��>�+(� #���!3)��'�&-l��"�%)� GoodLuck +!�.3/����*)� Welcome Manager .5=���%*�" Exit
����
��� � ans
ans = “GoodLuck”����
Manager .5=���%*�" Exit Password System ���� W elcom e
M anag er
���� E x i t P assw ordS y stem
��
:�<�
.��'���5 ���/��*.��'���5 ���/��*((44//55))� ��<6'.!)�!�$&���������2<&"��<��/ ��+!�2�����'�&"���<��/ ��
�&9��*)� 5000 ���%�5= 10% .5=+!�2�����'A�%�;/���,��3%�5= 3 �')������<��/ ��
� ���������-�="*551. ��%)�( &�2����� . ��<��/ ��2. �-�����'���%)� ��<��/ ��
-#�������*)� 5000 +!���<��/ �� = ��<��/ �� + (��<��/ �� * 10/100)3. %9��*7,��3 = ��<��/ �� * 34. .3/�552@8�5. :����'9����
.��'���5 ���/��*.��'���5 ���/��*((55//55))START
read name ,salary
false
A
bonus = salary * 3
STOP
salary < 5000 Name , salary , bonus
true
false
salary = salary + (salary*10/100)
A .�);")����������3���( &�"���
���%*�:9�� +�����-�����'����� &��;�.�� IF y THEN �<�"+!�'9����
��"%9�3&��" &��� &��;�"�%)��-0�:�<� ;")�<�"+!�'9���"��"%9�3&��-0��'?:
��������
��������
�� ���� 1
�������������
����
����
�� ���� 2
��������
�� ���� 1
�������������
����
�� ���� 2
��������
�� ���� 1
����
����
IF �������� T H E NBE GIN
�� ���� 1 ;�� ���� 2 ;
�������������
�� ���� 2
;E ND ;
��������
�� ���� 1
����
����
IF �������� T H E N
E LSEBE GIN
�������������
�� ���� 2
BE GIN�� ���� 1 ;�� ���� 2 ;
E ND ;
.��3��'���5 ��.��3��'���5 ��((11//66))� ���'9�����$����>)���� &��;� #���-0�:�<�;-'9����/���!�$&� #��
�-0��'?:�?:=;-'9���������)��!�$&�
�������� �������� ��������
�� ����2
�������������
�� ����1
.��3��'���5 ��.��3��'���5 ��((22//66))� #�� sex =1 �� &��;��-0�
:�<� :=�2<&"%)��*.-� Male �$����� 1
� #�� sex =1 �� &��;��-0�Sex = 1
TrueFalse
� #�� sex =1 �� &��;��-0��'?: :=�2<&"%)��*.-� Female �$����� 1
Male = Male +1Female = Female + 1
.��3��'���5 ��.��3��'���5 ��((33//66))START
read age
60 truefalse
��<&"���
��%)�+3)�*.-� age
�-����'���%)� "���*)� 60
STOP
age > 60
“You are old”
truefalse
“You are young”#���-0�:�<� 2<"28���%*�" You are old#���-0��'?: 2<"28���%*�" You are young
:����'9����
�-����'���%)� age "���*)� 60
.��3��'���5 ��.��3��'���5 ��((44//66))��<&"
����� ans
:�<��'?:
����� D o you like Pascal .3/����%*�" Do you like Pascal
��%)�+3)�*.-� ans
��<&"���'9����
ans = ‘y’ OR ans=‘ Y’
����� T hank You����� I’m sorry to hear that
:�<��'?:
����� Good Bye
:�
�-�����'���%)� ans �')��� y !� � Y-#���-0�:�<� 2<"28Thank you-#���-0��'?: 2<"28I�m sorry to hear that
2<"28%9�*)� Goodbye
:����'9����
.��3��'���5 ��.��3��'���5 ��((55//66))� ��<6'.!)�!�$&���������2<&"��<��/ ��+!�2�����'�&"���<��/ ���&9��*)�
5000 ���%�5= 10% .5=2�����'�&"���<��/ �����.�) 5000 �2<&" 5% +!�2�����'A�%�;/���,��3%�5= 3 �')������<��/ ��
� ���������-�="*551. ��%)�( &�2����� . ��<��/ ��2. �-�����'���%)� ��<��/ �� < 5000
- #���-0�:�<� +!������2<&"��<��/ �� = 10/100- #���-0��'?:+!������2<&"��<��/ �� = 5/100
3. %9��*7��<��/ �� = ��<��/ �� + (��<��/ �� * �����2<&"��<��/ ��)4. ,��3 = ��<��/ �� * 35. .3/�552@8�6. :����'9����
.��'���5 ���/��*.��'���5 ���/��*((66//66))START
read name ,salary
truefalse
A
bonus = salary * 3
salary = salary+(salary * rate)
STOP
salary < 5000
Name , salary , bonus
truefalse
rate = 10 / 100
A
bonus = salary * 3
.�);")����������3���( &�"���
rate = 5 / 100
����5 ��!5��'������5 ��!5��'��((.�� .�� IF)IF)� �-0��>-.������5 �����
'9����'�&"�'���5 ��"���*)� 2 '���$��;-
1
1
TrueFalse
2TrueFalse
23
3
TrueFalse
4
����5 ��!5��'������5 ��!5��'��((.�� .�� IF)IF)
Score >=80
Grade = ‘A’
truefalse
truefalse
Score = mid + final
Grade = ‘A’Score >=70
Grade = ‘B’
truefalse
Score >=60
Grade = ‘C’
truefalse
Score >=50
Grade = ‘D’
truefalse
Grade = ‘F’
����5 ��!5��'������5 ��!5��'��((.�� .�� CASE)CASE)� �-0��>-.������5 �����'9����'�&"�'���5 ��"���*)� 2 '��
�$��;-
21 43
1 2 3 4
����5 ��!5��'������5 ��!5��'��((.�� .�� CASE)CASE)
score
Score = mid + final
Grade = ‘B’Grade = ‘A’ Grade = ‘D’Grade = ‘C’
80..100 70..79 60..69 50..59
Grade = ‘F’
0..49
.��*�Y�9�.��*�Y�9�� .���9�!�/���;*�5)*�!���(Controlled Loop)� .����*:3���� &��;��)��(Pre-Test Condition)� .����*:3���� &��;�'�!5�(Post-Test Condition)
.���9�!�/������'9�������;*�5)*�!���.���9�!�/������'9�������;*�5)*�!���� "�����9�!�/������'9����Y�9�;*�5)*�!��� �" &�%����"
:9��*����:$�!�A/'9����Y�9�.5�*'9�%9�3&��)�;-
1
2
Next
.���9�!�/������'9�������;*�5)*�!���.���9�!�/������'9�������;*�5)*�!���� %)� N :=��<&"���'�& 1 .5=�2<&"%)�'�5= 1 :���='&� "���*)� 5
:$�!�A/���'9����Y�9� .5='9�%9�3&�#/:�� Next +�.�)5=���������'�&+!�'9�Y�9�% � 2<"28%)�+��*.-� N '�5=���
For N =1 , 5
Next
Print N
.����*:3���� &��;��)��#���-0�:�<�.5�*%)��'9�Y�9�.����*:3���� &��;��)��#���-0�:�<�.5�*%)��'9�Y�9�
� .����*:3���� &��;��)�� #���� &��;����-0�:�<�+!�'9����Y�9� :���='&��� &��;��-0��'?::$�!�A/'9����Y�9� .5�*;-'9����%9�3&�� &�#/;-
1
True
False
2
.����*:3���� &��;��)��#���-0�:�<�.5�*%)��'9�Y�9�.����*:3���� &��;��)��#���-0�:�<�.5�*%)��'9�Y�9�
� ��*:3���� &��;�#�� N <= 5� +!�2<"28 %)� N � �2<&"%)� N ��� 1 (N=N+1)
N <=5False
N = 1
� �5�;-��*:3���� &��;����:��*)��� &��:=�-0��'?: :$�!�A/'9����Y�9� .5�*;-'9����%9�3&�� &�
N <=5
N = N+1
True
Print N
.��'9�Y�9��)��.5�*%)����*:�� &��;�.��'9�Y�9��)��.5�*%)����*:�� &��;�� .��+!�'9����+�%9�3&�'9�Y�9��)��
.5�*%)����*:3���� &��;� #���� &��;����-0��'?:+!��5�;-'9����+�%9�3&�'9�Y�9���� :���='&� 1
��*:3��.5�*�� &���-0�:�<� :$�!�A/ .5�*;-'9����%9�3&�� &�
True
False
2
.��'9�Y�9��)��.5�*%)����*:�� &��;�.��'9�Y�9��)��.5�*%)����*:�� &��;�� +!�2<"28%)�+��*.-� N� �2<&"%)�+!��*.-� N ��� 1
� ��*:3���� &��;� #�� N >
N = 1
� ��*:3���� &��;� #�� N > 5 �-0�:�<�+!�!�A/'9����Y�9� #���-0��'?:+!��5�;-'9����%9�3&�Y�9�������
N > 5
True
False
N = N+1
Print N