Grade program

I'm writing a program for school and I really have no idea where to start. I'm really new at C/C++ programing so bare with me please :) .

I must make a program which turns "Letter" grades (eg.: A,B,C,D,E,F) into "Number?" grades (eg.:6,5,4,3,2,1) , where A=6,B=5,C=4,D=3,E=2,F=1.
Also if the grade is with a "-" (eg.: A- ; D-) the grade is substracted by 0,3 (A- = 5,7 ; B- = 4,7...)
And if it is with a "+" (eg.: A+ ; E+) the grade is summed by 0,3 (B+ = 5,3 ; C+ = 4,3...).
The even more tricky part , I think , is that A+ = 6 and F is always 1 (no matter "+" or "-".

I hope I described the program I'm trying to create well , because I translated it from my mother tongue. I really hope I won't confuse anyone with it :).
Thanks in advance !
I would start by writing down step by step what you wish the program to accomplish. The next thing it is important to know where you are getting the grades from a .txt file or is it a grade calculator (the user enters the grade and it prints to screen the number)? The first part of the actual programming I would go ahead and declare the A, B, C, etc as variables and assign the values to it then. You can do that by either a constant or an actual variable in the main program. The constant would be more appropriate if you are not modifying the variable. This will make writing the program easier since you will only need to compare the user input or the file value to a variable and you can do and else if statement to reflect that. That is how I would start an approach. It will make your life easier.
I have started making the program the same way as you said (A=6 ; B=5 , etc.) , but I don't really know how to make the +/- thing. I don't know how to write the program in order for it to show , for expample :
when It asks me to write a "Letter" grade : B+
to show : 5,3

Thank You murphyslaws for your comment ! I really appreciate it !
And sorry for maybe asking dumb questions ,but as I said I'm really new to this , if this even excuses me a little bit :( .
closed account (28poGNh0)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# include <iostream>
using namespace std;

float getNbrGrade(string strGrade)
{
    string gradeRef = "ABCDEF";
    size_t gradeNbrEq[] = {6,5,4,3,2,1};

    float nbrGrade = 0;

    bool pass = false;

    for(size_t i=0;i<gradeRef.size();i++)
    {
        if(gradeRef[i]==strGrade[0])
        {
            nbrGrade = gradeNbrEq[i];
            pass = true;
            break;
        }
    }

    if(strGrade.size()<3&&pass)
    {
        if(((strGrade[0]=='A')&(strGrade[1]=='-'))&&strGrade[0]!='F')
        {
            if(strGrade[1]=='-')
                nbrGrade -= 0.3;
            if(strGrade[1]=='+')
                nbrGrade += 0.3;
        }
    }

    return nbrGrade;
}

int main()
{
    cout << getNbrGrade("A+") << endl;

    return 0;
}


Hope that helps
Sry for the delayed reaction :D , but BIG THANKS to both of you !
Topic archived. No new replies allowed.