// name course exercise
const string NAME = "Cole Williams";
const string COURSE = "CST 113";
const string EXERCISE = " Exercise 7";
const int SCREEN_WIDTH = 80;
//task 2-----
const char sentinel = '#';
// end task 2---
int main(void)
{
//task 1 --------------------------------------------------------
int filename;
int count = 0;
int startvalue = 0;
//---------------------------------------------------------------
//Input file name
ifstream in;
ifstream in2;
in2.open("ex7task4.txt");
//output file name
ofstream out;
//Calling the needed files
out.open("ex7out.txt");
// Name Exersice Course
out << setw(50) << NAME << endl;
out << setw(47) << COURSE << endl;
out << setw(48) << EXERCISE << endl;
// end task 1 -----------------------------------------------------------------------
// start task 2 ---------------------------------------------------------------------
//task 2
char ch;
int acount;
int ecount;
int icount;
int ocount;
int ucount;
//end task 2
in.ignore(100,'\n');
}
out << endl;
out << "How many A's there are in the joke " << acount << endl;
out << "How many E's there are in the joke " << ecount << endl;
out << "How many I's there are in the joke " << icount << endl;
out << "How many O's there are in the joke " << ocount << endl;
out << "How many U's there are in the joke " << ucount << endl;
out << setfill('*') << setw(SCREEN_WIDTH) << " " << setfill(' ') << endl;
in.ignore(100,'\n');
//end task 2 code---------------------------------------------------------------------
//start task 3 code-------------------------------------------------------------------
bool done;
int points;
int totalpoints;
string names;
done = true;
totalpoints = 0;
out << "Flag controlled loop" << endl;
while(!done)
{
getline(in, names);
in >> points;
in >> names;