![]() |
|
#1
|
|||
|
|||
Help with loops?Based on the solution of assignment #2, using exactly the same computation to determine the grade, write a program to compute the grade for a class of students. To indicate that there is no more scores; use a negative # as the first assignment score.
If assign. #1 score is negative; your program should terminate without the need to read in the rest of the scores. However, for this assignment, it is acceptable to still require input for other assignment scores if assignment #1 score is part of ONE input statement for all scores of a student. In addition to compute and report the grade of each individual student, output a summary report showing the total number of students, and the number of students receiving each letter grade. No credits will be given if the program contains any compile-time or run-time error. Remember to comment your program, uses meaningful variable names, Have good indentation, echo-print your input, etc. Grading scheme: If the first assignment score for a student is O.K., then Normal computation if all other scores are within range If any other scores are not good, then do not count that student (ignore the rest of the score). It is also acceptable if the program repeats asking until all good scores are obtained, in that case, you have normal computation. Maximum point Deductions for programs that can execute, and give correct answers: 1. require to input the total number of students to control the loop 10 2. keep asking whether there are more students to control the loop 2 3. A sequence of if ‘s (not using else if’s) 5 4. does not check score between 0 and 100 10 Minimal acceptable program: if any input score out of range, output an error statement and ignore the student. Better solutions are also acceptable. 5. Minor mistakes in getting the Wrong answers for grades (A,B,C, etc.) 10 6. Minor mistakes in getting the Wrong counts for grades (A,B,C, etc.) 10 7. comments, indentation, prompts, etc. 20 that is my assignment and here is my finished assignment #2. CPP / C++ / C Code:
anyone care to help out? basically this is my assignment 3 but I am confused as what to do. |
|||
|
#2
|
|||
|
|||
Re: Help with loops?Quote:
The is a C programming forum. That phrase uses improper syntax. And why would you want to come up in her talking like that anyhow. Do you see others talking that way? I don't think so... But at least you wrote something so I will offer these for your amusement: The problem is you're using: CPP / C++ / C Code:
- you should qualify each input value one at a time as it is given . . if it is wrong re-get it, . . not as one batch at the end of 6 input values, how are you going to re-get if invalid? This: CPP / C++ / C Code:
I get 5 of these: warning: left-hand operand of comma expression has no effect. maybe use some + signs? but you don't want mass-qualify anyhow so forget it ... - I think you would be better off using a 2 dimensional array to store all the grades in. Maybe something like: CPP / C++ / C Code:
See what you think. |
|
#3
|
|||
|
|||
Re: Help with loops?sorry for the language, and no I think you made it too complex
|
|
#4
|
|||
|
|||
Re: Help with loops?Too confusing? sorry
I made following to point out some things you might want to learn about for your programming. CPP / C++ / C Code:
If you can understand the array use above, move to a 2 dimensional array. |
|
#5
|
|||
|
|||
Re: Help with loops?this assignment was to be made without arrays
|
|
#6
|
|||
|
|||
Re: Help with loops?Nevermind , go ahead and turn it in the way you have it...
|
|
#7
|
|||
|
|||
Re: Help with loops?i already finished it.
|
Recent GIDBlog
Problems with the Navy (Enlisted) by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| combine 2 struc loops into 1 loop | roy918 | C++ Forum | 4 | 01-Mar-2007 08:28 |
| Having Problems with Loops | cristale10 | C++ Forum | 2 | 02-Oct-2006 14:58 |
| nested for loops | sandeepeecs | C Programming Language | 3 | 20-Aug-2006 08:49 |
| Help with nested for loops...please. sorry newbie | keperry | C++ Forum | 14 | 16-Oct-2004 11:25 |
| Help using nested for loops | dontcare | C++ Forum | 1 | 03-Oct-2004 12:33 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The