Discussion in 'C++' started by tao_from_heaven@yahoo.com, Mar 9, 2007.

1. ### Guest

there are two quizzes and two major examinations, all graded on the
basis of 100 points. each major examinations, weighs twice the weight
of a quiz. grades are determined by the following scales.

90 -100 A
80 - 89 B
70 - 79 C
60 - 69 D
below 60 F

Load the above data in two arrays: 1 numeric and 1 character array.

the program above will read in the students' names and scores and will
output a table showing the students' name, average score and the final

the letter grade is to be searched in arrays which have been
90 A
80 B
70 C
60 D
0 F

use a function to search for the letter grade and another function to
print the students' names, average scores and final letter grade.

you need not store test scores (quizzes and major exams) in an array.

, Mar 9, 2007

2. ### Ian CollinsGuest

wrote:
> there are two quizzes and two major examinations, all graded on the
> basis of 100 points. each major examinations, weighs twice the weight
> of a quiz. grades are determined by the following scales.
>

If you any help with your homework, post your attempt. While you are at
it, drop the gibberish subject and use real words.

--
Ian Collins.

Ian Collins, Mar 9, 2007

3. ### Jacek DziedzicGuest

wrote:

> there are two quizzes and two major examinations, all graded on the
> basis of 100 points. each major examinations, weighs twice the weight
> of a quiz. grades are determined by the following scales.
>
> 90 -100 A
> 80 - 89 B
> 70 - 79 C
> 60 - 69 D
> below 60 F
>

[snip]

How much are you willing to pay?

- J.

Jacek Dziedzic, Mar 9, 2007
4. ### osmiumGuest

<> wrote:

> there are two quizzes and two major examinations, all graded on the
> basis of 100 points. each major examinations, weighs twice the weight
> of a quiz. grades are determined by the following scales.
>
> 90 -100 A
> 80 - 89 B
> 70 - 79 C
> 60 - 69 D
> below 60 F
>
> Load the above data in two arrays: 1 numeric and 1 character array.
>
> the program above will read in the students' names and scores and will
> output a table showing the students' name, average score and the final
>
> the letter grade is to be searched in arrays which have been
> 90 A
> 80 B
> 70 C
> 60 D
> 0 F
>
> use a function to search for the letter grade and another function to
> print the students' names, average scores and final letter grade.
>
> you need not store test scores (quizzes and major exams) in an array.

It looks to me like he wants you to read, from the keyboard, four numeric
scores, weight them properly and compute the mean score. Then convert the
mean score into a letter grade for the course. Print each student's name,
his mean numeric score and his letter grade. I suggest using just a simple
(one word) surname. Decide on an input format such as: name, q1, q2, e1 and
e2. Then write the program. Note that programmer's, including your
instructor, say "print" when they mean "display". Figure out some way for
the user to signal end of input to terminate the program. Sensing EOF is
the adult way, but there are other ways.

Where do you have a problem?

osmium, Mar 9, 2007
5. ### rossumGuest

On 9 Mar 2007 00:12:02 -0800, wrote:

>there are two quizzes and two major examinations, all graded on the
>basis of 100 points. each major examinations, weighs twice the weight
>of a quiz. grades are determined by the following scales.
>
> 90 -100 A
> 80 - 89 B
> 70 - 79 C
> 60 - 69 D
> below 60 F
>

if you show us what you have already done. That a) shows that you are
willing to do work for yourself and b) allows us to see what sort of
level you are at which helps us tailor our replies. If you are a real
beginner then alt.comp.lang.learn.c-c++ might be a better newsgroup
for you.

2 This is an English language newsgroup. Please avoid txtspk.

>Load the above data in two arrays: 1 numeric and 1 character array.

Can you declare two arrays and load the above data? If so then write
the code, if not then write your best attempt and post it here with an
explanation of what part doesn't work. There is a hint for you
further on in the question.

>
>the program above will read in the students' names and scores and will
>output a table showing the students' name, average score and the final

Can you read input from the keyboard? Can you read names (strings)
and numbers from the keyboard into variables in your program? How are
you going to know when the user has finished entering data?

>
>the letter grade is to be searched in arrays which have been
> 90 A
> 80 B
> 70 C
> 60 D
> 0 F
>
>use a function to search for the letter grade and another function to
>print the students' names, average scores and final letter grade.

Can you calculate an average and search the given table (stored as two
arrays)? Can you display the final grade on the screen?

>
>you need not store test scores (quizzes and major exams) in an array.

rossum

rossum, Mar 9, 2007
6. ### Stuart RedmannGuest

rossum wrote:
> 2 This is an English language newsgroup. Please avoid txtspk.

I was going to ask whether you'd mind to write a wikipedia entry for
txtspk only to discover that there is one already. We should add "Don't
use txtspk" in the list of Don'ts in the FAQ (although I doubt that the
OP were someone who would read the FAQ).

Stuart

Stuart Redmann, Mar 9, 2007