#include #include using namespace std; //This is lab 3. //These are to be called upon when typed under the main. //These are the function declarations. void hello(int); //This is part 1 of C. void cube(int&); //This is part 2 of C. double square_root(int); //This is part 3 of C. char grade(double); //This is part 4 of C. bool passed(char); //This is part 5 of C. void goodbye(); // This is part 6 of C int main () { int no_lines=5, num; double num2, score; char q; //Part 1.C hello( no_lines); //A call to the function Hello. //Part 2.C cout << "Please enter a number. This number will be cubed.\n"; cin >> num; cube(num); //Tell the cpu to refer to num formula. cout << num <> num2; if (num2 !=0) if (num2 == 0 || num2 <=0) cout << "IS WRONG TRY AGAIN Please enter a number greater than zero ONLY!.\n"; }while (num2 <= 0); square_root(num2); //Tells the cpu to square root the cin entered by the user. cout << sqrt(num2) <> score; }while (score < 0 || score >100); cout << "Then your grade for that exam was an/a:" << endl; cout << grade(score) << endl; //A call to thw score function after a value has been entered and a grade will ge given. //Part5.C q = grade(score); cout << "This is the grade you have received:\n";//Sentence stating the grade user got. cout << grade(score) <(num2)); cout << sqrt(num2) <= 90) return 'A'; else if (score >= 80) return 'B'; else if (score >= 70) return 'C'; else if (score >= 60) return 'D'; return 'F'; } //Part 5 of C. bool passed(char grade) { if ((grade=='A') | (grade=='B') | (grade =='C')) return true; return false; } void goodbye() { cout << "Goodbye now!" << endl; } //This is the end of the function definitions