English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Make a table of input and output. The output is the sum of the input and 2 if the input is even. The output is the product of the input and 2 if the input is odd. Use integer inputs 0 through 8.

2006-08-30 14:54:02 · 5 answers · asked by thelmadc06 1 in Science & Mathematics Mathematics

5 answers

4 hours?? You must be misunderstanding this.
If the input is 0 (even) then the output is 0+2.
If the input is 1 (odd) then the output is 1x2.
If the input is 2 (even) then the output is 2+2.
and so on....

2006-08-30 15:03:05 · answer #1 · answered by Art_333 2 · 2 0

You just do what it says. You make a table. In the input (left column) number 0 to 8. In the output (right column), compute the value based on the instructions. For the even inputs, add 2, for the odd inputs, multiply by 2.

Input | Output
......0 | 2
......1 | 2
......2 | 4
......3 | 6
......4 | 6
..... 5 | 10 and so on.

2006-08-30 22:19:06 · answer #2 · answered by Philo 7 · 0 0

in out
0 = 2
1 = 2
2 = 4
3 = 6
4 = 6
5 = 10
6 = 8
7 = 14
8 = 10

2006-08-30 22:20:59 · answer #3 · answered by GeometryGirl 1 · 0 0

Input | Output
_________________________

0 | 2
1 | 2
2 | 4
3 | 6
4 | 6
5 | 10
6 | 8
7 | 14
8 | 10

2006-08-30 22:16:48 · answer #4 · answered by Elim 5 · 0 0

Sounds like a binary problem.

2006-09-03 16:55:13 · answer #5 · answered by Anonymous · 0 0

fedest.com, questions and answers