Need a program that drops the lowest grade of a random amount of grades, then averages those grades. Have to use a counter controlled for loop nested inside a sentinel controlled input loop.
Help!!
Thanks!
Cheryl
Need a program that drops the lowest grade of a random amount of grades, then averages those grades. Have to use a counter controlled for loop nested inside a sentinel controlled input loop.
Help!!
Thanks!
Cheryl
Post what you've done so far and we'll be glad to help you through it. If you expect us to do your homework for you, look elsewhere.
Try not.
Do or do not.
There is no try.
- Master Yoda
Well.. here's what I have .. not much to work with.
..thank you in advance for any help/pointers you can provide.
int main(void)
{
float average;
int total = 0, numscore, score, ID;
printf("Enter the number of scores each student has: ");
scanf(%d", &numscore);
while (ID != -1){
int counter;
for (counter = 1; counter <= numscore; counter++){
printf("Enter a score: \n");
scanf("%d", &score);
}
average = (float) total / numscore;
if (average >= 50.0)
grade = S;
if (average > 50.0)
grade =U;
> scanf(%d", &numscore);
Well, fix the %d" into "%d" first.
Return 0 at the end of main, and if you do, post the end of main for us to view along with any relevant functions if applicable.
You have not declared or initalized grade.
Snag a few tutorials and see what you can manage, then post the heap if you're stuck.
This isn't a hard solution.
The world is waiting. I must leave you now.
That's nice -- thanks