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
A fatigue test was conducted in which the mean stress was 46.2 MPa and the stress amplitude was 219 MPa.
sleet_krkn [62]

Answer:

a)σ₁ = 265.2 MPa

b)σ₂ = -172.8 MPa

c)Stress\ ratio =-0.65

d)Range = 438 MPa

Explanation:

Given that

Mean stress ,σm= 46.2 MPa

Stress amplitude ,σa= 219 MPa

Lets take

Maximum stress level = σ₁

Minimum stress level =σ₂

The mean stress given as

\sigma_m=\dfrac{\sigma_1+\sigma_2}{2}

2\sigma_m={\sigma_1+\sigma_2}

2 x 46.2 =  σ₁ +  σ₂

 σ₁ +  σ₂ = 92.4 MPa    --------1

The amplitude stress given as

\sigma_a=\dfrac{\sigma_1-\sigma_2}{2}

2\sigma_a={\sigma_1-\sigma_2}

2 x 219 =  σ₁ -  σ₂

 σ₁ -  σ₂ = 438 MPa    --------2

By adding the above equation

2  σ₁ = 530.4

σ₁ = 265.2 MPa

-σ₂ = 438 -265.2 MPa

σ₂ = -172.8 MPa

Stress ratio

Stress\ ratio =\dfrac{\sigma_{min}}{\sigma_{max}}

Stress\ ratio =\dfrac{-172.8}{265.2}

Stress\ ratio =-0.65

Range = 265.2 MPa - ( -172.8 MPa)

Range = 438 MPa

8 0
3 years ago
What was the role of the rotors in the enigma machine?.
Lisa [10]

Answer:

Implements a reordering of the letters of the alphabet.

Explanation: GIVE ME 5 STARS AND a HEART!!!                                      Those contacts are wired across the rotor so that each contact on the left connects to the contact on the right in some scrambled arrangement. Each rotor, therefore, implements a reordering of the letters of the alphabet, which mathematicians call a permutation.

3 0
2 years ago
Which of the following types of protection is an employer required to pay for?
77julia77 [94]

Answer:

Hearing protection would be your answer!

Explanation:

This includes earplugs,muffs etc.

Hope it helps!

7 0
3 years ago
Read 2 more answers
Select the correct answer. Jennifer, a construction manager at a construction firm, has to hire several contractors and subcontr
Ymorist [56]
A. Quality management
7 0
3 years ago
Read 2 more answers
Almost all collisions are due to driver error
blondinia [14]

Answer:

Where's the questaion?

4 0
2 years ago
Other questions:
  • A 356 cast aluminum test bar is tested in tension. The initial gage length as marked on the sample is 50mm and the initial diame
    9·1 answer
  • A heat pump receives heat from a lake that has an average wintertime temperature of 6o C and supplies heat into a house having a
    12·1 answer
  • Two streams of air enter a control volume: stream 1 enters at a rate of 0.05 kg / s at 300 kPa and 380 K, while stream 2 enters
    13·1 answer
  • Match each situation with the type of material (conductor or inductor) you would want to use in it. You need to connect a recent
    15·1 answer
  • What is the maximal coefficient of performance of a refrigerator which cools down 10 kg of water (and then ice) to -6C. Upper he
    11·1 answer
  • Which is equal to a temperature of 50°F?<br><br> 18°C<br> 46°C<br> 10°C<br> 32°C
    13·2 answers
  • The diameter of a cylindrical water tank is Do and its height is H. The tank is filled with water, which is open to the atmosphe
    11·1 answer
  • Safety-in engineering as with everything else is all about trying to maximize or create the hazards involved with what you are d
    6·2 answers
  • A tool used to put a concave edge on a plane iron is
    6·1 answer
  • All of the dimensions on an aircraft drawing are_________<br> to the bottom of the drawing.
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!