Calculates average of three exams for each student

Assignment Help C/C++ Programming
Reference no: EM13166341

Create a program to read in 10 student grades data from file. The file contains student ID and scores for three exams.

Each row should contain 4 columns: here is my example below,

Student ID,      Exam1 grade,             exam2 grade,             exam 3 grade

14524              89                                78                                            95

25437              96                                88                                            95

The program reads the grades for students, calculates average of three exams for each student, and puts out to another file (called Summarygrades.txt) Student ID average and letter grade: example below,

Student Id       Average grade                        Letter grade

14524              87.3                                         B

...ETC....         

Here's what I got so far:

#include <iostream>
#include <iomanip>
#include <fstream>
using namespace std;
int main()
{
   double studentgrades, x;
   ifstream infile;
   char studentgrades[10];

   //prompt user for file to be opened and declare what you're reading from
   cout << "Please enter the student file" << endl;
   cin >> studentgrades;
   cout << "The file you entered is: " << studentgrades << endl;

   //Prompt for error
   if (!infile)
   {
       cerr << " Error opening file.\n ";
       exit(1);
   }
  
   //file opens
   for (int i = 0; i < 10; i++);
   {

   }

}

Reference no: EM13166341

Questions Cloud

Impressionist style of brilliant color and vibrant brushwor : What pair of painters best defines the pure impressionist style of brilliant  color and vibrant brushwork?
What is the empirical formula of the unknown compound : An unknown compound contains only C, H, and O. Combustion of 5.50 g of this compound prodced 11.0 g of CO2 and 4.50 g of H2O. What is the empirical formula of the unknown compound.
State what is the volume and uncertainty : The cube has an edge length of 0.26 ± 0.03 m. The volume of a cone is 1/3(pie)r^2h . What is the volume and uncertainty of the added water?
Compute the standard cost of one unit of product : Compute the budgeted amounts for 2012 for direct materials to be used, direct labor, and applied overhead and compute the standard cost of one unit of product.
Calculates average of three exams for each student : The program reads the grades for students, calculates average of three exams for each student, and puts out to another file (called Summarygrades.txt) Student ID average and letter grade: example below,
At what celsius temperature did water boil on the top : Mt. Kilimanjaro in Tanzania is the tallest peak in Africa (19,340 ft.). On a particular day, the barometric pressure at the top of the mountain was 330 torr. On that day, at what Celsius temperature did water boil on the top of the mountain?
How many grams of water where in the sample : A 45g piece of ice at 0 degree C is added to a sample of water at 21 degree C. All of the ice melts and the temp of water decreases to 0 degree C. How many grams of water where in the sample?
Explain what concentration of this base : What concentration of this base will produce a pH of 10.13?
At what temperature will it burst : a flask that can withstand an internal pressure of 2500 torr, but no more, is filled with a gas at 21.O C and 780 torr and heated. At what temperature will it burst?

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Performs a binary search instead of a linear search.

Modify the following program so it performs a binary search instead of a linear search. Use the selection sort algorithm to sort the array before the binary search is performed.

  Create a file, shared.txt

When your program starts, it shall do the following:1. Create a file, SHARED.txt, in the current directory (cwd). 2. Write it's pid (Process ID) followed by a Carriage Return and Newline in the file.

  Create a template class

Create a template class, SVector, that implements a constructor

  Write a program that reads in a list of integer numbers and

Write a program that reads in a list of integer numbers and print out the sum of all numbers, the average, the lowest and the highest value entered. The first input number indicates how many numbers the program is attempting to read. For example, if ..

  Create an array of objects from the provided code

Create an array of objects from the provided code and run a for loop to assign strings and numbers. In this assignment, I will need to see the main function. Make sure there is a default constructor.

  Write a program in which the user is prompted

Write a program in which the user is prompted for the number of values that they will be entering. The user then enters that number of integers into an array

  Display the array, the average and the number of days above

Write a program that stores the daily temperatures for the month of April in an array name dailytemp. Calculate the average temperature for the month and the count the number of days that the daily temperature was above the average.

  Implement recursive algorithms using a stack

Show the difficulties of the added complexity and which of the two sorts is easier to implement nonrecursively? Why?

  Program to compute the total volume

Write a program to compute the total volume for a number of cylinders. A cylinder may have different values for height and radius.

  Find the pairs in any given matrix

write a c program which will find the pairs in any given matrix, whose sum of pairs are 10.

  Program to compute gross wages for employee using array

Write program which uses the following arrays: payRate: array of seven floats to hold each employee's hourly pay rate. wages: array of seven floats to hold each employee's gross wages.

  Randominrange() function that accepts two integer

Write a randomInRange() function that accepts two integer parameters. The parameters will represent the low number and the high number (both inclusive) in the random range. For example, when the function receives 3 and 8.

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