- Mar 2, 2006
- 5,214
- 1
- 81
Okay, my friend has this program to write but he doesn't how to do it. Here's the problem:
a drunk stands in the middle of an 11-foot bridge. he has a 50% chance of taking a step to the left and a 50% chance of taking a step to the right. draw a picture showing his movements
sample output:
|-----x-----|
|------x----|
|-------x---|
|------x----|
|-----x-----|
|----x------|
|---x-------|
|--x--------|
|---x-------|
|----x------|
|-----x-----|
This type of program is too high of a calibur for me so I can't be of much assistance. He hasn't written his program yet. Well, he doesn't really need to because this problem is supposed to be extra credit but he needs the points.
Could somebody help him?
a drunk stands in the middle of an 11-foot bridge. he has a 50% chance of taking a step to the left and a 50% chance of taking a step to the right. draw a picture showing his movements
sample output:
|-----x-----|
|------x----|
|-------x---|
|------x----|
|-----x-----|
|----x------|
|---x-------|
|--x--------|
|---x-------|
|----x------|
|-----x-----|
This type of program is too high of a calibur for me so I can't be of much assistance. He hasn't written his program yet. Well, he doesn't really need to because this problem is supposed to be extra credit but he needs the points.
Could somebody help him?
