Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "course.h"
- #include <iostream>
- #include <fstream>
- using namespace std;
- course::course(int pubAnswers[4]){
- a=0,b=0,c=0,d=0;
- numberRightOverall=0;
- for(int i=0;i<4;i++)
- numberRightVersion[i]=0;
- numberRightOverall=pubAnswers[0]+pubAnswers[1]+pubAnswers[2]+pubAnswers[3];
- a=pubAnswers[0];
- b=pubAnswers[1];
- c=pubAnswers[2];
- d=pubAnswers[3];
- }
- void course::courseWrite(){
- ofstream output;
- output.open("Course Overview.txt");
- output<<"The number of answers correct for this course is "<<numberRightOverall<<endl;
- output<<"The number of answers correct for this Test A is "<<a<<endl;
- output<<"The number of answers correct for this Test B is "<<b<<endl;
- output<<"The number of answers correct for this Test C is "<<c<<endl;
- output<<"The number of answers correct for this Test D is "<<d<<endl;
- output.close();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement