Write a program to compute numeric grades for a course.

Assignment Help Operating System
Reference no: EM13943148

You can add in to the program I made below. It is incomplete but you can use it so that you would have a quicker time to complete the program. Step by step explanations would help me since I am an online learner. The question is as follows:

Write a program to compute numeric grades for a course. The course records are in a file that will serve as the input file. The input file is in exactly the following format: Each line contains a student's last name, then one space, then the student's first name, then one space, then ten quiz scores all on one line. The quiz scores are whole numbers and are separated by one space. Your program will take its input from this file and send its output to a second file. The data in the output file will be the same as the data in the input file except that there will be one additional number (of type double) at the end of each line. This number will be the average of the student's ten quiz scores. Use at least one function that has file streams as all or some of its arguments.

// Class average program with counter-controlled repetition

#include <iostream>

using std::cout;
using std::cin;
using std::end1;

const int MAX_GRADES = 10
// function main begins program execution
int main()
{
int total; // sum of grades input by user
int gradeCounter; // number of grade to be entered next
int grade; // grade value
int average; // average of grades

// initialization phase
total = 0; // initialize total
gradeCounter = 0; // initialize loop counter

// processing phase
while (gradeCounter<MAX_GRADES)
{ // loop MAX_GRADES times
cout << "Enter grade:"; // prompt for input
cin >> grade; // read grade from user
total = total + grade; // add grade to total
gradeCounter = gradeCounter + 1; // increment counter
}

// termination phase
average = total / MAX_GRADES; // integer division

// display result
cout << "Class average is " << average;
return 0; // indicate program
} // end function main

Reference no: EM13943148

Questions Cloud

What is the purchase price of the wine in us dollars : WSM Wine Importers, Inc. purchased 75,000 cases of French wine at a cost of 6,000,000 Euros. If the current exchange rate is 0.7576 Euros to the U.S. dollar, what is the purchase price of the wine in U.S. dollars?
Write a function isvowel() that test whether char is vowel : Use your function in a program that reads the standard input file and writes to the standard output file, deleting all vowels
Compare and contrast online analytic processing : Write a one page paper (250 words) on Compare and contrast Online Analytic Processing (OLAP) and Online Transaction Processing (OLTP); also discuss Codd's rules for TP databases and OLAP databases (New Times Roman, 12 pt, double spaced, Essay). Ci..
Specific drug that can be purchased over-the-counter : Discuss one specific drug that can be purchased over-the-counter, and is often misused. Discuss ways can a nurse help a client/ family to be compliant with medications that do not require a prescription
Write a program to compute numeric grades for a course. : You can add in to the program I made below. It is incomplete but you can use it so that you would have a quicker time to complete the program. Step by step explanations would help me since I am an online learner
Whether the company decision to be more ethical : Your presentation should include some analysis of whether the company's decision to be more ethical is proving to be a success amongst consumers or not, providing example of why that is the case.
What are the supporting torques : What is the very largest torque T that can be applied with elastic behavior everywhere? (Hint: cut combined shaft at C and consider separate shaft). What are the supporting torques?
Seminal paper by diffie and hellman : Appearing in the seminal paper by Diffie and Hellman, the first published public-key algorithm that defined public-key cryptography [DIFF76] is referred to as the Diffie-Hellman key exchange (Stallings & Brown, 2008, p. 641).
Discuss one specific drug given for alzheimer : Discuss one specific drug given for Alzheimer's. What ways can a nurse help a client/ family to be compliant with medications for Alzheimer's disease

Reviews

Write a Review

Operating System Questions & Answers

  Recognizes similarities-differences of two file systems

Complete two file system schemas (Visio is suggested to draw the diagram of each schema). First must be OS on your PC. (NT, Windows 2 K or XP).

  What are the major challenges that an os designer faces in

1.concurrency of course is a requirement for modern operating systems. what are the major challenges that an os

  Deadlock prevention.

Describe what changes could be made to an operating to break the conditions of non-preemption and hold and wait for deadlock prevention. What are the drawbacks of your changes?

  What is the next byte that host 1 is expected

What is the range of sequence numbers for the 2000 incoming bytes contained within the segment?

  Assessing security risks

In your new position at XYZ Company, you have been asked to lead a risk assessment group. As part of your assignment to assess security risks for the computing infrastructure.

  Question about data communications

A 4480 octet datagram is to be transmitted and requires to be fragmented because it will pass through an Ethernet with a maximum payload of 1500 octets.

  Find the time to access a reference word

If it is in main memory but not in the cache (called cache miss), 60 ns are needed to load it into the cache (this includes the time to originally check the cache), and then reference is started again.

  When a process enters the cpu your program must now forkand

when a process enters the cpu your program must now forkand exe a stand alone child process. you must use glxgears for

  Were these transmission errors or simply data errors

Are LANs a stable technology or are they changing just as quickly as other forms of communication technologies?

  Rize the operating system and application

clusters can be implemented by leveraging many operating systems and applications. in a report of 1-2 pages complete

  Difference between a formal and an informal system

Explain the main reasons that firms implement intranets and one major obstacle to obtaining these benefits also explain the difference between a formal and an informal system.

  Clusters can implemented by leveraging many operating system

Clusters can be implemented by leveraging many operating systems and applications. In a report of 1-2 pages, complete the following: Identify an operating system and application combination, and discuss at least 2 cluster implementation models suppo..

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd