Algorithms2 - Flowcharts Decisions Decisions Problem...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
Flowcharts Decisions
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Decisions Problem Description: Given two numbers, output TRUE if both are negative or both are positive; output FALSE otherwise. Given two numbers, output TRUE if one of them is 10 or if their sum is 10; output FALSE otherwise. Given a number n, output the absolute difference between n and 21, except output double the absolute difference if n is over 21. Given two numbers, output whichever number is larger.
Background image of page 2
Decisions Problem Description: You and your date are trying to get a table at a restaurant. The input value you is the stylishness of your clothes, in the range 0. .10, and date is the stylishness of your date's clothes. The output (getting the table) is "no", "maybe", or "yes". If either of you is very stylish, 8 or more, then the output is "yes". With the exception that if either of you has style of 2 or less, then the result is "no". Otherwise the
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 4
Background image of page 5
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 5

Algorithms2 - Flowcharts Decisions Decisions Problem...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online