Re: Loop help



>You need to define variables to hold your >counts of distinctions, merits

>etc. & for your total marks & number of loops, >and increment or add to
>them on each repetition of your main loop. >Programming won't help you
>until you've worked out the logic of what >you're trying to do.


I have defined variables shown below, I don't know how to get them to work
in a loop in that code, if it's a counting loop I need.

int mark1;
int mark2;
int mark3;
int score;
String grade;
int distinction;
int merit;
int pass;
int fail;
int meritTotal;
int passTotal;
int failTotal;
int examMark;
char Yes_No;
int total;
int highestMark;

If someone could give me an example of one I would appreciate it so I can
work the logic of the rest.

.



Relevant Pages

  • Re: Fridays the thirteenth. (And a little puzzle.)
    ... -- compiler) is the usual method ... int febdays ... -- We're going to go round a loop dealing with each year in turn. ... -- other languages call) ...
    (uk.people.silversurfers)
  • Re: C code is not generating required results.
    ... int main ... the array by the size of an element. ... prevent the user of your program from entering more characters than ... want to loop. ...
    (comp.lang.c)
  • Re: long double versions of functions in gcc under Cygwin
    ... rather than the nearest enclosing one) and a decent exception ... them it doesn't seem like goto usage would be affected ... int typfun() ... Why use a for loop when it is just a while loop in disguise? ...
    (comp.lang.c)
  • Re: enum type int or unsigned int?
    ... that have type int and may appear wherever such are permitted. ... values of all the members of the enumeration. ... "enum" types are declared via the following syntax: ... so the loop will continue to run. ...
    (comp.lang.c)
  • Re: STL - Vector - Normalization ?
    ... there's no time saved in the instructions of the body of the loop. ... > int max; ... and for "two" it calls the two-pass method. ... algorithms min_element etc in the function and did not use functors. ...
    (comp.lang.cpp)