Skip to content

Free in December. Through December 31, every feature for every exam is free with a free account. No plan, no card.

Free through December 31. Every feature for every exam, free with an account. No plan, no card. Create a free account

Free through December 31. Your account has every feature for every exam until then.

Algorithm and logic development

Algorithm and logic development is one of the subtopics of Mathematics in the FE Mechanical exam specification. Questions here are short: one scenario, four choices and about three minutes to answer with the FE Reference Handbook open beside you.

What you can be asked

These are the ideas our problems on Algorithm and logic development are built around. Each one is covered by at least one problem in the bank.

  • Flowchart or pseudocode tracing
  • Logic operations in an algorithm

Our practice bank has 2 problems on algorithm and logic development. Every problem is a calculation with a numeric answer. 1 of them come with a diagram. 1 use SI units and 1 use US customary units, as the exam mixes both.

Try one: a free Algorithm and logic development problem

The solution shows the steps with units, where the equation sits in the Handbook, and the mistake behind each wrong choice.

Free sample SI units

The flowchart shown is part of a routine in a test-rig controller. It sets S = 0 and K = 1, then repeatedly replaces S with S + K² and K with K + 2, testing after each pass whether K > 7; when the test is true it outputs S and stops. The value of S that the routine outputs is most nearly:

Swipe the diagram sideways to see all of it.

STARTS = 0, K = 1S = S + K²K = K + 2K > 7?NoYesOutput SSTOP
  1. A16
  2. B35
  3. C49
  4. D84

Work it out first. On the exam you would have about three minutes.

Show the answer and worked solution

AnswerD84

Find it in the Handbook

Electrical and Computer Engineering

Flowchart Definition

Flowchart symbols (process operation, decision, data I/O, start or stop point) from the Handbook; tracing the loop pass by pass (standard method; the Handbook has no formula for it)

Search (Ctrl+F)

Flowchart Definition

Given

  • Start: ,
  • Loop: , then , then test
  • Output when the test is true

Find

The value of that is output

  1. Trace the passes

    Pass 1: , . Pass 2: , . Pass 3: , ; is false, so loop again.

  2. Last pass and output

    Pass 4: , ; is true, so the routine outputs .

Why the other choices are wrong

  • A16 comes from adding instead of : . The process box squares the counter before adding it, so the sum is .
  • B35 comes from stopping when reaches 7, as if the test were . The test is , and 7 is not greater than 7, so the loop runs a fourth time and adds , giving 84.
  • C49 is only the last term, , as if each pass replaced with . The box adds to the running total, so accumulates .

Exam-day tip

Trace a loop in a table with one row per pass and one column per variable, and write the decision result (true or false) in each row. Pay special attention to the pass where the counter first equals the limit: a strict test such as lets that pass loop again.

Practice more Algorithm and logic development

The bank has 2 problems on this subtopic and 36 across Mathematics. Practice quizzes are part of membership. Not a member yet? The free diagnostic shows which areas to work on first. Through December 31, practice quizzes are free with a free account.

More in Mathematics