Untitled document - Imarree Carney Cs1020 Program...

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

Imarree Carney Cs1020/*Program Description:Source Code:Ch9num1.cppProgrammer Name: I'Marree CarneyDate: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.cppProgrammer Name: I'Marree CarneyDate: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 specifiedint numb_students;

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture