Purchase Solution

Efficient C program to compute letter grades

Not what you're looking for?

Ask Custom Question

Write an efficient C program using arrays, that reads a file consisting of students test scores in the range of 0-100, and outputs the Letter Grades and the number of students having got it, as per the following criteria:

F : 0-19
D : 20-39
C : 40-59
B : 60-79
A : 80-100

Purchase this Solution

Solution Summary

Solution not only gives an efficient C program that determines a letter grade using one comparison, but also explains the how/why of the logic behind it. A sample data file is also provided for testing convenience.

Solution Preview

We can also express the given letter grade and scores distribution as

F : 20*0 - (20*0 + 19)
D : 20*1 - (20*1 + 19)
C : 20*2 - (20*2 + 19)
B : 20*3 - (20*3 + 19)
A : 20*4 - [(20*4 + 19) ...

Purchase this Solution


Free BrainMass Quizzes
Word 2010: Table of Contents

Ever wondered where a Table of Contents in a Word document comes from? Maybe you need a refresher on the topic? This quiz will remind you of the keywords and options used when working with a T.O.C. in Word 2010.

C# variables and classes

This quiz contains questions about C# classes and variables.

Java loops

This quiz checks your knowledge of for and while loops in Java. For and while loops are essential building blocks for all Java programs. Having a solid understanding of these constructs is critical for success in programming Java.

Basic Computer Terms

We use many basic terms like bit, pixel in our usual conversations about computers. Are we aware of what these mean? This little quiz is an attempt towards discovering that.

Basic Networking Questions

This quiz consists of some basic networking questions.