I cannot get this program rolling to save my life!
Any help would be greatly appreciated!
Thanks in advanced.
So here I have a program that is supposed to basically sort out who passed and failed.
I am currently stuck on the switch statement, I'm trying to count how many students received an A, B, C, etc.
&&&&&I have no idea where to start. Help Please.
Here's what I have so far:
void passFailCount(char semester_grd, double semester_avg, int &sumpass, int &sumfail)
{
int i,
j;
if (semester_grd!='W' || semester_grd!='w' || semester_grd!='I' || semester_grd!='i')
{
if(semester_avg >= 59.5)
{
for (i=0; i < 13; i++);
{
sumpass+=i;
}
}
}
else if (semester_avg < 59.5)
{
for (j=0; j < 13; j++);
{
sumfail+=j;
}
}
}
void gradeCount(char semester_grd, int &sumAs)
{
switch (semester_grd)
case 'a' :
case 'A' : sumAs=0++;
break;
case 'b' :
case 'B' : sumBs=0++;
break;
case 'c' :
case 'C' : sumCs=0++;
case 'd' :
case 'D' : sumDs=0++;
break;
case 'f' :
case 'F' : sumFs=0++;
break;
case 'w' :
case 'W' : sumWs=0++;
break;
case 'i' :
case 'I' : sumIs=0++;
break;
}
/*
***Call a void function gradeCount to determine how many of each letter grade was assigned. (A’s, B’s, C’s, D’s, F’s, W’s, & I’s)
Note: For full credit, you must use a switch to accomplish this task.
*/