Explore BrainMass
Share

Little Man Computer: printing odd numbers

This content was STOLEN from BrainMass.com - View the original, and get the already-completed solution here!

Write a Little Man program that prints out the odd numbers from 1 to 99. No input is required.

© BrainMass Inc. brainmass.com October 25, 2018, 2:27 am ad1c9bdddf
https://brainmass.com/computer-science/program-execution/little-man-computer-printing-odd-numbers-300592

Solution Preview

Following program has been tested using Little Man Simulator at http://www.atkinson.yorku.ca/~sychen/research/LMC/LittleMan.html .

LOOPTOP LDA CURRENT // Load the current value of counter
OUT ...

Solution Summary

Little Man Simulator at http://www.atkinson.yorku.ca/~sychen/research/LMC/LittleMan.html has been used for testing the program.

$2.19
See Also This Related BrainMass Solution

Counting Principles

I need help with these 6 problems

Section 8.1 #14
Section 8.2 #20,46
Section 8.3 #26
Section 8.4 #8,16

14. A menu offers a choice of 3 salads, 8 main dishes, and 5
desserts. How many different meals consisting of one
salad, one main dish, and one dessert are possible?

20. A group of 3 students is to be selected from a group of
12 students to take part in a class in cell biology.
a. In how many ways can this be done?
b. In how many ways can the group who will not take part
be chosen?

46. Pizza Varieties A television commercial for Little Caesars
pizza announced that with the purchase of two pizzas, one
could receive free any combination of up to five toppings
on each pizza. The commercial shows a young child waiting
in line at Little Caesars who calculates that there are
1,048,576 possibilities for the toppings on the two pizzas.*
a. Verify the child's calculation. Use the fact that Little
Caesars has 11 toppings to choose from. Assume that the
order of the two pizzas matters; that is, if the first pizza
has combination 1 and the second pizza has combination
2, that is different from combination 2 on the first pizza
and combination 1 on the second.
b. In a letter to The Mathematics Teacher, Joseph F. Heiser
argued that the two combinations described in part a
should be counted as the same, so the child has actually
overcounted. Give the number of possibilities if the
order of the two pizzas doesn't matter.

26. After studying all night for a final exam, a bleary-eyed student randomly grabs 2 socks
from a drawer containing 9 black, 6 brown, and 2 blue socks, all mixed together. What
is the probability that she grabs a matched pair?

Suppose that a family has 5 children. Also, suppose that the probability of having a girl is 1/2.
Find the probabilities that the family has the following children.

8. No more than 4 girls

A coin is tossed 6 times. Find the probabilities of getting the following.

16. Exactly 3 heads

View Full Posting Details