/*
*copyright (c) 2014, College of Computer Science, Yantai University
*all rights reserved.
* File Name: 16 weeks (Project four dynamic array)
* Wangzhong
* Completion Date: 2014.12.15
* Version Number: v1.0
*
* Problem Description: Add a dynamic array of the appropriate length, "copy" the data from the original array to the new array, and then enter the new data. An array of new data is added as a new array to hold the data.
* Input Description: Enter score, number of students
* Program output: Number of new student scores
#include <iostream>using namespace Std;int main () { int num,i,addnum; Num is the group number cout<< "Enter the number of students:"; cin>>num; int *score = new Int[num]; cout<< "Please enter student grade:"; Enter num name Student's score for (i=0; i<num; i++) cin>>score[i];//* (score+i) cout<< "How many students do I need to add?" "; cin>>addnum; Addnum is required to increase the number of people //below the program to complete the expansion of the array and enter additional scores for (I=num; i<num+addnum; i++) cin>>score[i]; Num=num+addnum; cout<< "now has a total of << num <<" Students, their grades are: "<<endl; for (i=0; i<num; i++) cout<<score[i]<< " "; cout<<endl; delete []score; return 0;}
16 Weeks (Project four dynamic array)