Hello everyone,
I'm a new C++, and I have a question that needs to help.
Here is my assignment:
Bailey M CC 68
Harrison F CC 71
Grant M UN 75
Peterson F UN 69
Hsu M UN 79
Bowles M CC 75
Anderson F UN 64
Nguyen F CC 68
Sharp F CC 75
Jones M UN 75
McMillan F UN 80
Gabriel F UN 62
M F : MALE, FEMALE
CC : Community College
UN : University
+ I have been successful how to make the output for all of them, but I'm really stuck how to get those number to calculate the average from that text.txt using fstream
+ Also in the output. Please help me how to calculate the average of male, female using fstream.
+ Here is my code:
#include <iostream>
#include <iomanip>
#include <fstream>
#include <string>
using namespace std;
int main()
{
string reply;
string inputFileName;
string line;
int count;
int number;
double total;
ifstream inputFile;