atas.cpp codes.txt

Info icon This preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
#include<iostream> #include<fstream> #include <cmath> using namespace std; ofstream outfile("atasoutfile.txt"); ifstream infile("atascout.txt"); int validgroup(int &x,int &y, int &z, ofstream &outfile); void onegamescore(int y,ofstream &); void onegamescorec(int y); int avg3scores(int a,int b,int c); void headings(); int main(){ int score1, score2, score3; int average; int count = 0; int validcount = 0; int invalidcount = 0; int headings(); int validgroup(int score1, int score2,int score3, int & ofstream); ofstream cout("atascout.txt"); while ((score1 || score2 || score3) != -1){ cout << "Enter the first score or enter -1 to stop"<< endl; cin >> score1; cout << "Enter the second score or enter -1 to stop" << endl; cin >> score2; cout << " Enter the third score or enter -1 to stop" <<endl; cin >> score3; count++; } if(score1 > 0 || score1 < 300 && score2 > 0 || score2 < 300 && score3 > 0 || score3 < 300) { return 1; } else { return -1; } { void headings() cout << "Please enter the 3 bowling scores(Enter in -1 to stop):" << endl; } int validgroup( int score1,int score2,int score3, ofstream &); int ans = 1; if(x == -1 || y == -1 || z == -1) ans = -1 while (ans == 1)
Image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
{ if(score1 > 0 || score1 < 300 && score2 > 0 || score2 < 300 &&
Image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern