Algorithms2

# Algorithms2 - Flowcharts Decisions Decisions Problem...

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

Flowcharts Decisions

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

View Full Document
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.
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

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

## Algorithms2 - Flowcharts Decisions Decisions Problem...

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

View Full Document
Ask a homework question - tutors are online