SlideShare a Scribd company logo
1 of 23
Desk Checking
    Kelly
Bauer

Desk
checking,
given
all

             values

BEGIN
RandProg
             Go through the algorithm, and list
   A=3
                     as headings, all the components
   B=4
                     that change values in the
   C=5
                     algorithm.
   Counter=0

   Number=20

   WHILE
Number>
Counter

      A=A+1

      B=B+1

      C=C+B

      Print
C

      Counter=
Counter+B

   ENDWHILE


END
RandProg

Desk
checking,
given
all

             values

BEGIN
RandProg
                 Go through the algorithm, and list
   A=3
                         as headings, all the components
   B=4
                         that change values in the
   C=5
                         algorithm.
   Counter=0

   Number=20
        A      B       C         Counte    Numbe        Print
   WHILE
Number>
Counter
                     r         r
      A=A+1

      B=B+1

      C=C+B

      Print
C

      Counter=
Counter+B

   ENDWHILE


END
RandProg

Desk
checking,
given
all

             values

BEGIN
RandProg
                 Go through the algorithm line by
   A=3
                         line and add the results of each
   B=4
                         line to the table.
   C=5

   Counter=0

   Number=20
        A      B       C        Counte    Numbe       Print
   WHILE
Number>
Counter
                    r         r
      A=A+1

      B=B+1

      C=C+B

      Print
C

      Counter=
Counter+B

   ENDWHILE


END
RandProg

Desk
checking,
given
all

             values

BEGIN
RandProg
                 Go through the algorithm line by
   A=3
                         line and add the results of each
   B=4
                         line to the table.
   C=5

   Counter=0

   Number=20
        A      B       C        Counte    Numbe       Print
   WHILE
Number>
Counter
                    r         r
      A=A+1
           3
      B=B+1

      C=C+B

      Print
C

      Counter=
Counter+B

   ENDWHILE


END
RandProg

Desk
checking,
given
all

             values

BEGIN
RandProg
                 Go through the algorithm line by
   A=3
                         line and add the results of each
   B=4
                         line to the table.
   C=5

   Counter=0

   Number=20
        A      B       C        Counte    Numbe       Print
   WHILE
Number>
Counter
                    r         r
      A=A+1
           3    4
      B=B+1

      C=C+B

      Print
C

      Counter=
Counter+B

   ENDWHILE


END
RandProg

Desk
checking,
given
all

             values

BEGIN
RandProg
                 Go through the algorithm line by
   A=3
                         line and add the results of each
   B=4
                         line to the table.
   C=5

   Counter=0

   Number=20
        A      B       C        Counte    Numbe       Print
   WHILE
Number>
Counter
                    r         r
      A=A+1
           3    4       5
      B=B+1

      C=C+B

      Print
C

      Counter=
Counter+B

   ENDWHILE


END
RandProg

Desk
checking,
given
all

             values

BEGIN
RandProg
                 Go through the algorithm line by
   A=3
                         line and add the results of each
   B=4
                         line to the table.
   C=5

   Counter=0

   Number=20
        A      B       C        Counte    Numbe       Print
   WHILE
Number>
Counter
                    r         r
      A=A+1
           3    4       5        0
      B=B+1

      C=C+B

      Print
C

      Counter=
Counter+B

   ENDWHILE


END
RandProg

Desk
checking,
given
all

             values

BEGIN
RandProg
                 Go through the algorithm line by
   A=3
                         line and add the results of each
   B=4
                         line to the table.
   C=5

   Counter=0

   Number=20
        A      B       C        Counte    Numbe       Print
   WHILE
Number>
Counter
                    r         r
      A=A+1
           3    4       5        0         20
      B=B+1

      C=C+B

      Print
C

      Counter=
Counter+B

   ENDWHILE


END
RandProg

Desk
checking,
given
all

             values

BEGIN
RandProg
                 Go through the algorithm line by
   A=3
                         line and add the results of each
   B=4
                         line to the table.
   C=5

   Counter=0

   Number=20
        A      B       C        Counte    Numbe       Print
   WHILE
Number>
Counter
                    r         r
      A=A+1
           3    4       5        0         20
      B=B+1

      C=C+B
           4
      Print
C

      Counter=
Counter+B

   ENDWHILE


END
RandProg

Desk
checking,
given
all

             values

BEGIN
RandProg
                 Go through the algorithm line by
   A=3
                         line and add the results of each
   B=4
                         line to the table.
   C=5

   Counter=0

   Number=20
        A      B       C        Counte    Numbe       Print
   WHILE
Number>
Counter
                    r         r
      A=A+1
           3    4       5        0         20
      B=B+1

      C=C+B
           4    5
      Print
C

      Counter=
Counter+B

   ENDWHILE


END
RandProg

Desk
checking,
given
all

             values

BEGIN
RandProg
                 Go through the algorithm line by
   A=3
                         line and add the results of each
   B=4
                         line to the table.
   C=5

   Counter=0

   Number=20
        A      B       C        Counte    Numbe       Print
   WHILE
Number>
Counter
                    r         r
      A=A+1
           3    4       5        0         20
      B=B+1

      C=C+B
           4    5       10
      Print
C

      Counter=
Counter+B

   ENDWHILE


END
RandProg

Desk
checking,
given
all

             values

BEGIN
RandProg
                 Go through the algorithm line by
   A=3
                         line and add the results of each
   B=4
                         line to the table.
   C=5

   Counter=0

   Number=20
        A      B       C        Counte    Numbe       Print
   WHILE
Number>
Counter
                    r         r
      A=A+1
           3    4       5        0         20
      B=B+1

      C=C+B
           4    5       10                             10
      Print
C

      Counter=
Counter+B

   ENDWHILE


END
RandProg

Desk
checking,
given
all

             values

BEGIN
RandProg
                 Go through the algorithm line by
   A=3
                         line and add the results of each
   B=4
                         line to the table.
   C=5

   Counter=0

   Number=20
        A      B       C        Counte    Numbe       Print
   WHILE
Number>
Counter
                    r         r
      A=A+1
           3    4       5        0         20
      B=B+1

      C=C+B
           4    5       10       5                     10
      Print
C

      Counter=
Counter+B

   ENDWHILE


END
RandProg

Desk
checking,
given
all

             values

BEGIN
RandProg
                 Go through the algorithm line by
   A=3
                         line and add the results of each
   B=4
                         line to the table.
   C=5

   Counter=0

   Number=20
        A      B       C        Counte    Numbe       Print
   WHILE
Number>
Counter
                    r         r
      A=A+1
           3    4       5        0         20
      B=B+1

      C=C+B
           4    5       10       5                     10
      Print
C
         5
      Counter=
Counter+B

   ENDWHILE


END
RandProg

Desk
checking,
given
all

             values

BEGIN
RandProg
                   Go through the algorithm line by
   A=3
                           line and add the results of each
   B=4
                           line to the table.
   C=5

   Counter=0

   Number=20
             A   B          C        Counte    Numbe    Print
   WHILE
Number>
Counter
                         r         r
      A=A+1
              3   4          5        0         20
      B=B+1

      C=C+B
              4   5          10       5                  10
      Print
C
            5   6          16       9                  16
      Counter=
Counter+B

   ENDWHILE


END
RandProg

Desk
checking,
given
all

             values

BEGIN
RandProg
                 And so on until you have run
   A=3
                         through the entire program
   B=4

   C=5

   Counter=0

   Number=20
        A      B       C        Counte    Numbe   Print
   WHILE
Number>
Counter
                    r         r
      A=A+1
           3    4       5        0         20
      B=B+1

      C=C+B
           4    5       10       5                 10
      Print
C
         5    6       16       9                 16
      Counter=
Counter+B

                       6    7       23       32                23
   ENDWHILE


END
RandProg

Desk Checking
   Variable
values

BEGIN
                              So,
what
do
you
need

  Read
Number
1,
Read
               to
test?


  Number
2

  IF
Difference
<0
THEN
             CRITICAL
VALUES

       Print
“First
number
is

       lower”
                      Set
1:
Large
number,

  ELSE
                              small
number

       Print
“Second
Number
is

       lower”

                                    Set
2:
Small
number,

  END
IF

                                     large
Number

END

                                    Set
3:
Same
Numbers

Set
1:
Large
Number,

          Small
Number

BEGIN

  Read
Number
1,
Read

  Number
2

  IF
Difference
<0
THEN

       Print
“First
number
is

       lower”

  ELSE

       Print
“Second
Number
is

       lower”

  END
IF
                        Num1   Num2   Differenc   Output
                                               e
END

                                 3      1      2           Second
                                                           Number is
                                                           lower
Set
2:
Small
Number,

          Large
Number


BEGIN

  Read
Number
1,
Read

  Number
2

  IF
Difference
<0
THEN

       Print
“First
number
is

       lower”

  ELSE

       Print
“Second
Number
is

       lower”

  END
IF
                        Num1   Num2   Differenc   Output
                                               e
END

                                 1      2      -1          First
                                                           Number is
                                                           lower
Set
3:
Same
Numbers

BEGIN

  Read
Number
1,
Read

  Number
2

  IF
Difference
<0
THEN

       Print
“First
number
is

       lower”

  ELSE

       Print
“Second
Number
is

       lower”

  END
IF
                        Num1   Num2   Differenc   Output
                                               e
END

                                 3      3      0
Desk Chekcing Algorithms

More Related Content

Viewers also liked (10)

2008 Exam Questions Social And Ethical
2008 Exam Questions Social And Ethical2008 Exam Questions Social And Ethical
2008 Exam Questions Social And Ethical
 
Psd - Programma Structuur Diagram
Psd - Programma Structuur DiagramPsd - Programma Structuur Diagram
Psd - Programma Structuur Diagram
 
Nassi shneiderman diagrams
Nassi shneiderman diagramsNassi shneiderman diagrams
Nassi shneiderman diagrams
 
Meta Languages Railroad Diagrams
Meta Languages Railroad DiagramsMeta Languages Railroad Diagrams
Meta Languages Railroad Diagrams
 
Meta Languages Bnf Ebnf Student Version
Meta Languages Bnf Ebnf Student VersionMeta Languages Bnf Ebnf Student Version
Meta Languages Bnf Ebnf Student Version
 
Exam feedback term 1 2011
Exam feedback term 1 2011Exam feedback term 1 2011
Exam feedback term 1 2011
 
Algorithms Vs Meta Language
Algorithms Vs Meta LanguageAlgorithms Vs Meta Language
Algorithms Vs Meta Language
 
Searching algorithms
Searching algorithmsSearching algorithms
Searching algorithms
 
Data Structures - Lecture 8 [Sorting Algorithms]
Data Structures - Lecture 8 [Sorting Algorithms]Data Structures - Lecture 8 [Sorting Algorithms]
Data Structures - Lecture 8 [Sorting Algorithms]
 
Sorting Algorithms
Sorting AlgorithmsSorting Algorithms
Sorting Algorithms
 

More from Kelly Bauer

More from Kelly Bauer (20)

Logo design
Logo designLogo design
Logo design
 
Team teaching
Team teachingTeam teaching
Team teaching
 
Cmyk vs rgb
Cmyk vs rgbCmyk vs rgb
Cmyk vs rgb
 
Structural factors
Structural factorsStructural factors
Structural factors
 
Scaffolding activities
Scaffolding activitiesScaffolding activities
Scaffolding activities
 
Team teaching
Team teachingTeam teaching
Team teaching
 
Entry document
Entry documentEntry document
Entry document
 
Project showcase
Project showcaseProject showcase
Project showcase
 
Project showcase church in the middle ages
Project showcase church in the middle agesProject showcase church in the middle ages
Project showcase church in the middle ages
 
Selection and justification
Selection and justificationSelection and justification
Selection and justification
 
6 multimedia elements - www
6   multimedia elements - www6   multimedia elements - www
6 multimedia elements - www
 
3 multimedia elements - audio
3   multimedia elements - audio3   multimedia elements - audio
3 multimedia elements - audio
 
OHS for Industrial Technology
OHS for Industrial TechnologyOHS for Industrial Technology
OHS for Industrial Technology
 
Images (Samples from past exams
Images (Samples from past examsImages (Samples from past exams
Images (Samples from past exams
 
Personell issues
Personell issuesPersonell issues
Personell issues
 
Differentiation
DifferentiationDifferentiation
Differentiation
 
Exam feedback term 1 2011
Exam feedback term 1 2011Exam feedback term 1 2011
Exam feedback term 1 2011
 
5 multimedia elements - animation
5   multimedia elements - animation5   multimedia elements - animation
5 multimedia elements - animation
 
4 multimedia elements - video
4   multimedia elements - video4   multimedia elements - video
4 multimedia elements - video
 
Stem 71 24 multimedia elements - graphics
Stem 71 24   multimedia elements - graphicsStem 71 24   multimedia elements - graphics
Stem 71 24 multimedia elements - graphics
 

Recently uploaded

Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 

Recently uploaded (20)

Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
 

Desk Chekcing Algorithms

  • 1. Desk Checking Kelly
Bauer

  • 2. Desk
checking,
given
all
 values
 BEGIN
RandProg
 Go through the algorithm, and list A=3
 as headings, all the components B=4
 that change values in the C=5
 algorithm. Counter=0
 Number=20
 WHILE
Number>
Counter
 A=A+1
 B=B+1
 C=C+B
 Print
C
 Counter=
Counter+B
 ENDWHILE
 END
RandProg

  • 3. Desk
checking,
given
all
 values
 BEGIN
RandProg
 Go through the algorithm, and list A=3
 as headings, all the components B=4
 that change values in the C=5
 algorithm. Counter=0
 Number=20
 A B C Counte Numbe Print WHILE
Number>
Counter
 r r A=A+1
 B=B+1
 C=C+B
 Print
C
 Counter=
Counter+B
 ENDWHILE
 END
RandProg

  • 4. Desk
checking,
given
all
 values
 BEGIN
RandProg
 Go through the algorithm line by A=3
 line and add the results of each B=4
 line to the table. C=5
 Counter=0
 Number=20
 A B C Counte Numbe Print WHILE
Number>
Counter
 r r A=A+1
 B=B+1
 C=C+B
 Print
C
 Counter=
Counter+B
 ENDWHILE
 END
RandProg

  • 5. Desk
checking,
given
all
 values
 BEGIN
RandProg
 Go through the algorithm line by A=3
 line and add the results of each B=4
 line to the table. C=5
 Counter=0
 Number=20
 A B C Counte Numbe Print WHILE
Number>
Counter
 r r A=A+1
 3 B=B+1
 C=C+B
 Print
C
 Counter=
Counter+B
 ENDWHILE
 END
RandProg

  • 6. Desk
checking,
given
all
 values
 BEGIN
RandProg
 Go through the algorithm line by A=3
 line and add the results of each B=4
 line to the table. C=5
 Counter=0
 Number=20
 A B C Counte Numbe Print WHILE
Number>
Counter
 r r A=A+1
 3 4 B=B+1
 C=C+B
 Print
C
 Counter=
Counter+B
 ENDWHILE
 END
RandProg

  • 7. Desk
checking,
given
all
 values
 BEGIN
RandProg
 Go through the algorithm line by A=3
 line and add the results of each B=4
 line to the table. C=5
 Counter=0
 Number=20
 A B C Counte Numbe Print WHILE
Number>
Counter
 r r A=A+1
 3 4 5 B=B+1
 C=C+B
 Print
C
 Counter=
Counter+B
 ENDWHILE
 END
RandProg

  • 8. Desk
checking,
given
all
 values
 BEGIN
RandProg
 Go through the algorithm line by A=3
 line and add the results of each B=4
 line to the table. C=5
 Counter=0
 Number=20
 A B C Counte Numbe Print WHILE
Number>
Counter
 r r A=A+1
 3 4 5 0 B=B+1
 C=C+B
 Print
C
 Counter=
Counter+B
 ENDWHILE
 END
RandProg

  • 9. Desk
checking,
given
all
 values
 BEGIN
RandProg
 Go through the algorithm line by A=3
 line and add the results of each B=4
 line to the table. C=5
 Counter=0
 Number=20
 A B C Counte Numbe Print WHILE
Number>
Counter
 r r A=A+1
 3 4 5 0 20 B=B+1
 C=C+B
 Print
C
 Counter=
Counter+B
 ENDWHILE
 END
RandProg

  • 10. Desk
checking,
given
all
 values
 BEGIN
RandProg
 Go through the algorithm line by A=3
 line and add the results of each B=4
 line to the table. C=5
 Counter=0
 Number=20
 A B C Counte Numbe Print WHILE
Number>
Counter
 r r A=A+1
 3 4 5 0 20 B=B+1
 C=C+B
 4 Print
C
 Counter=
Counter+B
 ENDWHILE
 END
RandProg

  • 11. Desk
checking,
given
all
 values
 BEGIN
RandProg
 Go through the algorithm line by A=3
 line and add the results of each B=4
 line to the table. C=5
 Counter=0
 Number=20
 A B C Counte Numbe Print WHILE
Number>
Counter
 r r A=A+1
 3 4 5 0 20 B=B+1
 C=C+B
 4 5 Print
C
 Counter=
Counter+B
 ENDWHILE
 END
RandProg

  • 12. Desk
checking,
given
all
 values
 BEGIN
RandProg
 Go through the algorithm line by A=3
 line and add the results of each B=4
 line to the table. C=5
 Counter=0
 Number=20
 A B C Counte Numbe Print WHILE
Number>
Counter
 r r A=A+1
 3 4 5 0 20 B=B+1
 C=C+B
 4 5 10 Print
C
 Counter=
Counter+B
 ENDWHILE
 END
RandProg

  • 13. Desk
checking,
given
all
 values
 BEGIN
RandProg
 Go through the algorithm line by A=3
 line and add the results of each B=4
 line to the table. C=5
 Counter=0
 Number=20
 A B C Counte Numbe Print WHILE
Number>
Counter
 r r A=A+1
 3 4 5 0 20 B=B+1
 C=C+B
 4 5 10 10 Print
C
 Counter=
Counter+B
 ENDWHILE
 END
RandProg

  • 14. Desk
checking,
given
all
 values
 BEGIN
RandProg
 Go through the algorithm line by A=3
 line and add the results of each B=4
 line to the table. C=5
 Counter=0
 Number=20
 A B C Counte Numbe Print WHILE
Number>
Counter
 r r A=A+1
 3 4 5 0 20 B=B+1
 C=C+B
 4 5 10 5 10 Print
C
 Counter=
Counter+B
 ENDWHILE
 END
RandProg

  • 15. Desk
checking,
given
all
 values
 BEGIN
RandProg
 Go through the algorithm line by A=3
 line and add the results of each B=4
 line to the table. C=5
 Counter=0
 Number=20
 A B C Counte Numbe Print WHILE
Number>
Counter
 r r A=A+1
 3 4 5 0 20 B=B+1
 C=C+B
 4 5 10 5 10 Print
C
 5 Counter=
Counter+B
 ENDWHILE
 END
RandProg

  • 16. Desk
checking,
given
all
 values
 BEGIN
RandProg
 Go through the algorithm line by A=3
 line and add the results of each B=4
 line to the table. C=5
 Counter=0
 Number=20
 A B C Counte Numbe Print WHILE
Number>
Counter
 r r A=A+1
 3 4 5 0 20 B=B+1
 C=C+B
 4 5 10 5 10 Print
C
 5 6 16 9 16 Counter=
Counter+B
 ENDWHILE
 END
RandProg

  • 17. Desk
checking,
given
all
 values
 BEGIN
RandProg
 And so on until you have run A=3
 through the entire program B=4
 C=5
 Counter=0
 Number=20
 A B C Counte Numbe Print WHILE
Number>
Counter
 r r A=A+1
 3 4 5 0 20 B=B+1
 C=C+B
 4 5 10 5 10 Print
C
 5 6 16 9 16 Counter=
Counter+B
 6 7 23 32 23 ENDWHILE
 END
RandProg

  • 18. Desk Checking Variable
values

  • 19. BEGIN
   So,
what
do
you
need
 Read
Number
1,
Read
 to
test?

 Number
2
 IF
Difference
<0
THEN
   CRITICAL
VALUES
 Print
“First
number
is
 lower”
   Set
1:
Large
number,
 ELSE
 small
number
 Print
“Second
Number
is
 lower”
   Set
2:
Small
number,
 END
IF
 large
Number
 END
   Set
3:
Same
Numbers

  • 20. Set
1:
Large
Number,
 Small
Number
 BEGIN
 Read
Number
1,
Read
 Number
2
 IF
Difference
<0
THEN
 Print
“First
number
is
 lower”
 ELSE
 Print
“Second
Number
is
 lower”
 END
IF
 Num1 Num2 Differenc Output e END
 3 1 2 Second Number is lower
  • 21. Set
2:
Small
Number,
 Large
Number

 BEGIN
 Read
Number
1,
Read
 Number
2
 IF
Difference
<0
THEN
 Print
“First
number
is
 lower”
 ELSE
 Print
“Second
Number
is
 lower”
 END
IF
 Num1 Num2 Differenc Output e END
 1 2 -1 First Number is lower
  • 22. Set
3:
Same
Numbers
 BEGIN
 Read
Number
1,
Read
 Number
2
 IF
Difference
<0
THEN
 Print
“First
number
is
 lower”
 ELSE
 Print
“Second
Number
is
 lower”
 END
IF
 Num1 Num2 Differenc Output e END
 3 3 0