Thread Subject:
help with program PLEASE URGENT

Subject: help with program PLEASE URGENT

From: fada

Date: 22 Oct, 2008 14:07:10

Message: 1 of 3

I DON'T KNOW MUCH ABOUT MATLAB
how do i write a program that performs a survey tally on beverages. the program should prompt the user for the next person until a sentinel value of -1 is entered to terminate the program. each person participating in the survey should choose their favorite beverage from the following list:
1. coffee 2. tea 3. coke 4. orange juice


sample run

please input the favorite beverage of person #1: choose 1, 2, 3 or 4 from above menu or -1 to exit the program
4

please input the favorite beverage of person #1: choose 1, 2, 3 or 4 from above menu or -1 to exit the program
1

please input the favorite beverage of person #1: choose 1, 2, 3 or 4 from above menu or -1 to exit the program
3

please input the favorite beverage of person #1: choose 1, 2, 3 or 4 from above menu or -1 to exit the program
1

please input the favorite beverage of person #1: choose 1, 2, 3 or 4 from above menu or -1 to exit the program
1

please input the favorite beverage of person #1: choose 1, 2, 3 or 4 from above menu or -1 to exit the program
-1

the total number of people surveyed is 5. The results are as follows:

Beverage Number of votes
***********************************************
coffee 3
tea 0
coke 1
orange juice 1



how is it that i write this program please may i get some help
NEED SUM 1 TO SHOW ME HOW ITS WRITTEN PLEASE!!!

Subject: help with program PLEASE URGENT

From: Bas

Date: 22 Oct, 2008 14:38:13

Message: 2 of 3

On Oct 22, 4:07 pm, fada <djw...@live.com> wrote:
> NEED SUM 1 TO SHOW ME HOW ITS WRITTEN PLEASE!!!

We are not going to do your homework for you, buddy, screaming in CAPS
LOCK is not going to help anything. And it is only urgent because you
started doing your homework late, there are only volunteers here that
are not in a hurry to help you. Anyhow, you might start by typing
'help while' and 'help input' in your matlab prompt ...

Bas

Subject: help with program PLEASE URGENT

From: ImageAnalyst

Date: 22 Oct, 2008 15:23:31

Message: 3 of 3

On Oct 22, 10:07=A0am, fada <djw...@live.com> wrote:
> I DON'T KNOW MUCH ABOUT MATLAB
> how do i write a program that performs a survey tally on beverages. the p=
rogram should prompt the user for the next person until a sentinel value of=
 -1 is entered to terminate the program. each person participating in the s=
urvey should choose their favorite beverage from the following list:
> 1. coffee 2. tea 3. coke 4. orange juice
>
> sample run
>
> please input the favorite beverage of person #1: choose 1, 2, 3 or 4 from=
 above menu or -1 to exit the program
> 4
>
> please input the favorite beverage of person #1: choose 1, 2, 3 or 4 from=
 above menu or -1 to exit the program
> 1
>
> please input the favorite beverage of person #1: choose 1, 2, 3 or 4 from=
 above menu or -1 to exit the program
> 3
>
> please input the favorite beverage of person #1: choose 1, 2, 3 or 4 from=
 above menu or -1 to exit the program
> 1
>
> please input the favorite beverage of person #1: choose 1, 2, 3 or 4 from=
 above menu or -1 to exit the program
> 1
>
> please input the favorite beverage of person #1: choose 1, 2, 3 or 4 from=
 above menu or -1 to exit the program
> -1
>
> the total number of people surveyed is 5. The results are as follows:
>
> Beverage Number of votes
> ***********************************************
> coffee 3
> tea 0
> coke 1
> orange juice 1
>
> how is it that i write this program please may i get some help
> NEED SUM 1 TO SHOW ME HOW ITS WRITTEN PLEASE!!!

------------------------------------------------------------------
fada:
Type this on the MATLAB command line:
>> doc questdlg
Get their input string, convert it to a number, and use that number as
the index to a 1 by 4 array that contains the number of responses for
the various beverages.
Next time choose a better subject line and get an earlier start on
your homework so that it is not so urgent.
Good luck,
ImageAnalyst

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
loop sherefa 28 Oct, 2008 01:14:07
is sherefa 28 Oct, 2008 01:14:07
a sherefa 28 Oct, 2008 01:14:07
break sherefa 28 Oct, 2008 01:14:07
in sherefa 28 Oct, 2008 01:14:07
important sherefa 28 Oct, 2008 01:14:07
statement sherefa 28 Oct, 2008 01:14:07
homework vgood 22 Oct, 2008 10:27:26
rssFeed for this Thread

Contact us