I remember that question. For calculating the cumulative GPA....well I didn't. I just looked up my GPA on my transcript. I'm not sure if the university you attend has an online system with which you can check your grades, but on such a system you can access your GPA by semester, cumulative GPA and in-major GPA among other things.
For calculating the pre-requisite GPA, I just used my university's system, which is also the system used by most universities except they don't assign A+ grades here. A B is a 3.0, B+ is 3.3, A- is 3.7 and A is 4.0. Some schools have slightly different values but you should be able to find the system for your school somewhere on the web.