Test.cpp - #include <iostream> using namespace std/char...

This preview shows page 1 out of 1 page.

#include <iostream> using namespace std; //char computeGrade(){ // int grade1; // int grade2; // cin >> grade1; // cin >> grade2; // cout << "Grade1 is " << grade1 << endl; // cout << "Grade2 is " << grade2 << endl; // double finalGrade = (grade1 * 0.5) + (grade2 * 0.5); // cout << finalGrade << endl; // if (finalGrade > 90) { // return 'A'; // } // else if(finalGrade > 80){ // return 'B'; // } // else if (finalGrade > 70) { // return 'C'; // } // else if (finalGrade > 60) { // return 'D'; // } // else { // return 'F'; // } //} void myfunction1(int* p) { *p = 10; p[2] = 15; cout << p[0] << " " << p[1] << " " << p[2] << endl; }void myfunction2(int* p) { *p = 75; p = new int[3]; for (int i = 0; i < 3; i++)

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture