looking how this transaction data is coming, does my actual seq_trans file look like it would apply?
Code:
3 100 5 Jeff
4 101 5 Mark
1 102 3 Jenn
2 103 5 Chris
4 104 4 Matt
3 105 3 Dan
0 106 4 Dave
5 107 14 Rich
3 108 2 Mike
1 109 4 Tony
4 110 5 Rob
2 111 -4 Sonny
3 112 4 Luke
4 113 3 April
2 114 9 Sheryl
4 115 4 Tom
5 116 18 Lamont
1 117 3 Steve
2 118 1 Jake
3 119 3 Austin
0 0 0
I don't believe so. It should have repeats of ID and name with their test score additions, etc.
and is this how the coding would go for the switches? be gentle.
Code:
switch(trans) {
case 0: //no if(trans == 0) { needed.
printf("Enter a key and name, respectively.");
scanf("%d%d", &theId, &theName);
theTest1 = 0;
theTest2 = 0;
theTest3 = 0;
theHwCount = 0;
theHwPoints = 0;
}
case 1: //no else if(trans == 1) { needed.
printf("Enter value for test 1");
scanf("%d", &theTest1);
}
case 2: //no else if(trans == 2) { needed
printf("Enter value for test 2");
scanf("%d", &theTest2);
}
//etc.
else if(trans == 3) {
printf("Enter a value for test 3");
scanf("%d", &theTest3);
}
else if(trans == 4) {
printf("Enter a value for homework count");
scanf("%d", &theHwCount);
printf("Any additional points for homework? (0 -> 5)");
scanf("%d", &theHwPoints);
}
else if(trans == 5) {
printf("Enter a value for extra homework points, not exceeding 5 times actual homework count");
scanf("%d", &theHwPoints);
}
}