Question: The program was not attached to your question. Find attached of the program and the answer.
Answer:
See the explanation for the answer.
Step-by-step explanation:
#include <iostream>
using namespace std;
int main()
{
cout << "How many students will you enter? ";
int n;
cin>>n;
string *name = new string[n];
double *gpa = new double[n];
for(int i=0;i<n;i++){
cout<<"Enter student"<<(i+1)<<"'s name: ";
cin>>name[i];
cout<<"Enter student"<<(i+1)<<"'s gpa: ";
cin>>gpa[i];
}
cout<<"The list students"<<endl;
cout<<"Name GPA"<<endl;
cout<<"----------------------"<<endl;
for(int i=0;i<n;i++){
cout<<name[i]<<" "<<gpa[i]<<endl;
}
return 0;
}
OUTPUT : See the attached file.