Untitled document - Program Description Source...

This preview shows page 1 - 5 out of 5 pages.

/* Program Description: Source Code:Ch9num1.cpp Programmer Name: I'Marree Carney Date:02/01/17 */ #include<iostream> using namespace std; int num(int number); int* finder (int num); int main() { int number=0; int *array; number=num(number); array=finder(number); for(int n=0;n<number;n++) { cout<<array[n]<<endl; } } int num(int number) { cout <<"How many elements are in the array? "; cin >> number; cout << number << endl; return number; }
int* finder (int num) { int *array=new int(num); for(int n=0;n<num;n++) { cout<<"The value found in element number "<<n+1<<endl; cin>>array[n]; } return array; }
/* Program Description: Source Code:Ch9num2.cpp Programmer Name: I'Marree Carney Date:02/01/17 */ #include <iostream> #include <algorithm> #include <vector> using namespace std;
void sorting(vector<int> &); float avg(vector<int> &student_score,int size); int main() { vector<int> student_score; // no size specified int numb_students; float studentAveraging=0;

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture