Hey there, i have been given a task to complete as home work for college and i seriously have no idea how to do it, hopeing one of you guys would be able to shed some light on it for me?
Well here it is.
You have been asked to create a program that prompts the user for the score for a multiple choice test; there are 20 questions, each questions scores 0 or 1 point (i.e no half-points), so the max score a student can achieve is 20, and the minimum score is 0.The program will loop with the folowing complex condition, written here in pseudocode:
WHILE(SCORE>=0) AND(SCORE<=20) DO

The number of people in a class varies, so loop until a score outside the range has been typed in (check to make sure that this number does not get included in with the test scores and class average). After the loop is finished, display the clas average, and the total number of people who took the test.

Any help that anyone could shed on this would be greatly appreciated.

Greg

1)i'm not sure that condition is good. you must continue with questions until all the questions have an answer.
2)post what you have accomplished until now, so we can help you

best regards,

Im sorry i really dont understand the questions at all, i have been off college for like a month and that is when the software dev class started, if i dont get this done by friday i fail :'(

Im sorry i really dont understand the questions at all, i have been off college for like a month and that is when the software dev class started, if i dont get this done by friday i fail :'(

my friend, you don't ask for help, you're asking the program! http://www.daniweb.com/techtalkforums/announcement124-2.html

i explained you before, you must make a loop for all the clases selected, inside it another loop for each student from that class, and finally a loop which will count the questions

You state that valid scores are 0 through 20 and the number of scores is unknown, so your condition is correct. You need to do the loop until an invalid score (say -1) is entered. Within the loop, you need to add the score to a tally variable and incriment a second count variable. When you exit the loop, divide the sum of the scores by the number of scores to get your average. While most Pascal systems will set the initial value of your variables to zero, it is always a good idea to do so in code anyway before you enter the loop.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.