For research purposes and to assist students, the admissions office of your local university wants to know how well female and male students perform in certain courses. You receive input that contains female and male students' GPAs for certain courses. Due to confidentiality, the letter code f is used for female students; m is used for male students. Every entry consists of a letter code followed by a GPA (for example, f 3.9). The number of entries is unknown.
Write a program that computes and outputs the average GPA for both female and male students. Format your results to two decimal places. Make your program take all the input from the user, reading in the 'm' or 'f' character followed by the GPA decimal value.
Hint: you will be using a loop that loops an unknown number of times, like until the user enters the character 'q' or something. As you are looping, be computing the overall male and female GPA sums and how many GPAs you have entered (per male and per female). Then after your loop, compu
Numbers and figures are an essential part of our world, necessary for almost everything we do every day. As important…
APPROVED BY CLIENTS
"assignmentexpert.com" is professional group of people in Math subjects! They did assignments in very high level of mathematical modelling in the best quality. Thanks a lot
Comments
Leave a comment