1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
ratelena [41]
3 years ago
10

The attached program (studentsGpa.cpp) uses dynamic allocation to create an array of strings. It asks the user to enter a number

and based on the entered number it allocates the array size. Then based on that number it asks the user that many times to enter student’s names. What you need to do:Add another array of doubles to store the gpa of each student as you enter themYou need to display both the student’s name and the gpa.NOTE: must use pointer notation not array subscript. Any submission that uses array subscript won’t be graded

Engineering
1 answer:
Arisa [49]3 years ago
5 0

Question: The program was not attached to your question. Find attached of the program and the answer.

Answer:

See the explanation for the answer.

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.

You might be interested in
Carbon monoxide coming from your car smells like
Lemur [1.5K]
I wouldn’t smell like anything carbon monoxide is an odorless gas
3 0
3 years ago
An add tape of 101 ft is incorrectly recorded as 100 ft for a 200-ft distance. What is
baherus [9]

Answer:

the correct distance is 202 ft

Explanation:

The computation of the correct distance is shown below:

But before that correction to be applied should be determined

= (101 ft - 100 ft) ÷ (100 ft) × 200 ft

= 2 ft

Now the correct distance is

= 200 ft +  2 ft

= 202 ft

Hence, the correct distance is 202 ft

The same would be relevant and considered too

4 0
3 years ago
What characteristic makes a plaster tender a Job Zone One occupation?
Goryan [66]
Occupational


Good luck I just copied the guy I front lol
4 0
3 years ago
For the reactions of ketone body metabolism, _______.
Artemon [7]

Answer:

Is

Explanation:

7 0
3 years ago
The base class Pet has attributes name and age. The derived class Dog inherits attributes from the base class Pet class and incl
Nonamiya [84]

Answer:

Explanation:

class Pet:

   def __init__(self):

       self.name = ''

       self.age = 0

   def print_info(self):

       print('Pet Information:')

       print('   Name:', self.name)

       print('   Age:', self.age)

class Dog(Pet):

   def __init__(self):

       Pet.__init__(self)

       self.breed = ''

def main():

   my_pet = Pet()

   my_dog = Dog()

   pet_name = input()

   pet_age = int(input())

   dog_name = input()

   dog_age = int(input())

   dog_breed = input()

   my_pet.name = pet_name

   my_pet.age = pet_age

   my_pet.print_info()

   my_dog.name = dog_name

   my_dog.age = dog_age

   my_dog.breed = dog_breed

   my_dog.print_info()

   print('   Breed:', my_dog.breed)

main()

3 0
3 years ago
Other questions:
  • In manufacturing a particular set of motor shafts, only shaft diameters of between 38.00 and 37.50 mm are usable. If the process
    12·1 answer
  • A thin metal disk of mass m=2.00 x 10^-3 kg and radius R=2.20cm is attached at its center to a long fiber. When the disk is turn
    11·1 answer
  • Intravenous infusions are usually driven by gravity by hanging the bottle at a sufficient height to counteract the blood pressur
    11·1 answer
  • The electricity generated by wind turbines annually in kilowatt-hours per year is given in a file. The amount of electricity is
    5·2 answers
  • A pictoral logo is a ________________ and it's identifying the ___________ of the company.
    5·1 answer
  • What is the first step in the Design Process *
    5·1 answer
  • Which option identifies the tool best to use in the following scenario?
    13·1 answer
  • ) Chain drive ratio is a the ratio between the rotational speeds of the input and output _________ of a roller chain drive syste
    9·1 answer
  • While discussing PCM monitor tests: Technician A says that some monitors only run after another monitor completes. Technician B
    10·1 answer
  • All heavy sanding and grinding must be done outside because of grinding
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!