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
An aluminum part will be subjected to cyclic loading where the maximum stress will be 300 MPa and the minimum stress will be-100
Dominik [7]

Answer:

a) The mean stress experimented by the aluminium part is 100 megapascals, b) The stress amplitude of the aluminium part is 400 megapascals, c) The stress ratio of the aluminium part is 4.

Explanation:

a) The mean stress is determined by this expression:

\sigma_{m} = \frac{\sigma_{min}+\sigma_{max}}{2}

Where:

\sigma_{m} - Mean stress, measured in megapascals.

\sigma_{min} - Minimum stress, measured in megapascals.

\sigma_{max} - Maximum stress, measured in megapascals.

If we know that \sigma_{min} = -100\,MPa and \sigma_{max} = 300\,MPa, the mean stress is:

\sigma_{m} = \frac{-100\,MPa+300\,MPa}{2}

\sigma_{m} = 100\,MPa

The mean stress experimented by the aluminium part is 100 megapascals.

b) The stress amplitude is given by the following difference:

\sigma_{a} = |\sigma_{max}-\sigma_{min}|

Where \sigma_{a} is the stress amplitude, measured in megapascals.

If we know that \sigma_{min} = -100\,MPa and \sigma_{max} = 300\,MPa, the stress amplitude is:

\sigma_{a} = |300\,MPa-(-100\,MPa)|

\sigma_{a} = 400\,MPa

The stress amplitude of the aluminium part is 400 megapascals.

c) The stress ratio (R) is the ratio of the stress amplitude to mean stress. That is:

R = \frac{\sigma_{a}}{\sigma_{m}}

If we know that \sigma_{m} = 100\,MPa and \sigma_{a} = 400\,MPa, the stress ratio is:

R = \frac{400\,MPa}{100\,MPa}

R = 4

The stress ratio of the aluminium part is 4.

3 0
3 years ago
An AM radio transmitter radiates 550 kW at a frequency of 740 kHz. How many photons per second does the emitter emit?
kifflom [539]

Answer:

1121.7 × 10³⁰ photons per second

Explanation:

Data provided in the question:

Power transmitted by the AM radio,P = 550 kW = 550 × 10³ W

Frequency of AM radio, f = 740 kHz = 740 × 10³ Hz

Now,

P = \frac{NE}{t}

here,

N is the number of photons

t is the time

E = energy = hf

h = plank's constant = 6.626 × 10⁻³⁴ m² kg / s

Thus,

P = \frac{NE}{t} = \frac{N\times(6.626\times10^{-34}\times740\times10^{3})}{1}          [t = 1 s for per second]

or

550 × 10³ = \frac{N\times(6.626\times10^{-34}\times740\times10^{3})}{1}

or

550 = N × 4903.24 × 10⁻³⁴

or

N = 0.11217 × 10³⁴ = 1121.7 × 10³⁰ photons per second

7 0
3 years ago
How did technology change society in the Renaissance?
WINSTONCH [101]
I think it’s A


Hope I helped
8 0
3 years ago
Read 2 more answers
The use of seatbelts in a car has significantly reduced the number of crash fatalities. Which statement best explains how societ
satela [25.4K]

as the public need for preventing injuries and deaths from car crashes became known,laws were enacted to mandate the inclusion of seatbelts in almost all passengers vehicles

8 0
2 years ago
The minimum fresh air requirement of a residential building is specified to be 0.35 air changes per hour (ASHRAE, Standard 62, 1
Thepotemich [5.8K]

Answer:

a) The flow capacity of the fan is 3150 L/min

d) the minimum diameter is 0.11 m

Explanation:

given data:

A = area of residence = 200 m²

h = height of building = 2.7 m

Percentage of air that must be replaced by fresh air is 35%

v = velocity of air in the duct = 5.5 m/s

a) The volume of the entire building is:

Volume=2.7*200=540m^{3}

The flow capacity of the fan is equal to:

Flow=\frac{0.35*540}{60} =3.15m^{3} /min

Flow=3.15\frac{m^{3} }{min} *\frac{1000L}{1m^{3}  } =3150L/min

b) The volume flow rate of fresh air is equal to:

Flow=\frac{\pi *d^{2} }{4} V\\d=\sqrt{\frac{4*Flow}{\pi V} } =\sqrt{\frac{4*3.15}{\pi *5.5*60} } =0.11m

6 0
4 years ago
Other questions:
  • A satellite orbits the Earth every 2 hours at an average distance from the Earth's centre of 8000km. (i) What is the average ang
    7·1 answer
  • Tech A says that low compression on a single cylinder will cause an engine not to start. Tech B says that low compression on a s
    7·1 answer
  • (a)Compute the electrical conductivity of a cylindrical silicon specimen 7.0 mm (0.28 in.) diameter and 57 mm (2.25 in.) in leng
    9·1 answer
  • Estimate the endurance strength of a 1.5-in-diameter rod of AISI 1040 steel having a machined finish and heat-treated to a tensi
    7·1 answer
  • Consider a metal single crystal oriented such that the normal to the slip plane and the slip direction are at angles of 43.1 deg
    6·1 answer
  • If outside of the flask is not dry when first determination is made and it is dried for second determination, what effect will t
    15·1 answer
  • The article "Some Parameters of the Population Biology of Spotted Flounder (Ciutharus linguatula Linnaeus, 1758) in Edremit Bay
    9·1 answer
  • A student lives in an apartment with a floor area of 60 m2 and ceiling height of 1.8 m. The apartment has a fresh (outdoor) air
    14·1 answer
  • 1. Discuss how products incorporate aesthetic design and why this appeals to target markets 2. Discuss how the universal design
    15·1 answer
  • Draw a circuit diagram connected in a reverse bias showing a p-n material and a battery
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!