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
vova2212 [387]
3 years ago
8

Create two arrays with 5 elements each: one will hold Strings and the second will hold integers. Write a program to ask the user

to enter 5 student names and their ages. Output the data from the parallel arrays.

Engineering
1 answer:
MrMuchimi3 years ago
5 0

Answer:

#include <iostream>

#include <iomanip>

#include <string>

using namespace std;

int main() {

   string name[5];  

   int age[5];  

   int i,j;  

   for ( i = 0; i<=4; i++ ) {  

       cout << "Please enter student's name:";  

       cin >> name[i];  

       cout << "Please enter student's age:";  

       cin >> age[i];          

   }  

for (i=0;i<=4;i++){

   cout<<"Age of  "<< name[i]<<"  is  "<<age[i]<<endl;  

}

}

Output of above program is displayed in figure attached.

You might be interested in
Calculate the volume of a hydraulic accumulator capable of delivering 5 liters of oil between 180 and 80 bar, using as a preload
Vinil7 [7]

Answer:

1) V_o = 10 liters

2) V_o = 12.26 liters

Explanation:

For isothermal process n =1

V_o =\frac{\Delta V}{(\frac{p_o}{p_1})^{1/n} -(\frac{p_o}{p_2})^{1/n}}

V_o  = \frac{5}{[\frac{72}{80}]^{1/1} -[\frac{72}{180}]^{1/1}}

V_o = 10 liters

calculate pressure ratio to determine correction factor

\frac{p_2}{p_1} =\frac{180}{80} = 2.25

correction factor for calculate dpressure ration  for isothermal process is

c1 = 1.03

actual \ volume = c1\times 10 = 10.3 liters

b) for adiabatic process

n =1.4

volume of hydraulic accumulator is given as

V_o =\frac{\Delta V}{[\frac{p_o}{p_1}]^{1/n} -[\frac{p_o}{p_2}]^{1/n}}

V_o  = \frac{5}{[\frac{72}{80}]^{1/1.4} -[\frac{72}{180}]^{1/1.4}}

V_o = 12.26 liters

calculate pressure ratio to determine correction factor

\frac{p_2}{p_1} =\frac{180}{80} = 2.25

correction factor for calculate dpressure ration  for isothermal process is

c1 = 1.15

actual \volume = c1\times 10 = 11.5 liters

8 0
3 years ago
A cylinder with a frictionless piston contains 0.05 m3 of air at 60kPa. The linear spring holding the piston is in tension. The
AleksAgata [21]

Answer:

18 kJ

Explanation:

Given:

Initial volume of air = 0.05 m³

Initial pressure = 60 kPa

Final volume = 0.2 m³

Final pressure = 180 kPa

Now,

the Work done by air will be calculated as:

Work Done = Average pressure × Change in volume

thus,

Average pressure = \frac{60+180}{2}  = 120 kPa

and,

Change in volume = Final volume - Initial Volume = 0.2 - 0.05 = 0.15 m³

Therefore,

the work done = 120 × 0.15 = 18 kJ

4 0
3 years ago
Compare the use of a low-strength, ductile material (1018 CD) in which the stress-concentration factor can be ignored to a high-
kicyunya [14]

Answer:

Step 1 of 3

Case A:

AISI 1018 CD steel,

Fillet radius at wall=0.1 in,

Diameter of bar

From table deterministic ASTM minimum tensile and yield strengths for some hot rolled and cold drawn steels for 1018 CD steel

Tensile strength

Yield strength

The cross section at A experiences maximum bending moment at wall and constant torsion throughout the length. Due to reasonably high length to diameter ratio transverse shear will be very small compared to bending and torsion.

At the critical stress elements on the top and bottom surfaces transverse shear is zero

Explanation:

See the next steps in the attached image

5 0
3 years ago
Preheat and postheating are necessary when welding gray cast iron. *<br> True<br> False
Zepler [3.9K]
True will be your answer have a great day
5 0
3 years ago
A rotating beam is subject to an alternating stress of 48 kpsi and a mean stress of 24 kpsi. The ultimate strength of the materi
Alisiya [41]

Answer:

goodman = 0.694

life of beam = 211597

Explanation:

alternating stress = 48 kpsi

mean stress = 24 kpsi

ultimate strength = 100 kpsi

endurance limit = 40 kpsi

goodman:

= \frac{mean stress}{ultimate stress} +\frac{alternating stress}{endurance limit} =\frac{1}{N}

= \frac{24}{100} +\frac{48}{40} =\frac{1}{N}

= 0.24 + 1.2 = \frac{1}{N}

N = 1/1.44

N = 0.694

2. check attachment for diagram

Log(N)-3/3 = log90 - log48/log90 - log40

Log(N)-3/3 = 0.77517

Log N = 5.325509

N = 10^(5.325509)

N = 211597

6 0
3 years ago
Other questions:
  • Answer this question fast
    8·1 answer
  • given the classes above, what output is produced by the following code? meg[] elements ={new Lois(), new Stewie(), new Meg(), ne
    15·1 answer
  • Very thin films are usually deposited under vacuum conditions to prevent contamination and ensure that atoms can fly directly fr
    14·1 answer
  • In Engineering, what is a shoulder on a bridge?
    8·1 answer
  • A hypothetical A-B alloy of composition 57 wt% B-43 wt% A at some temperature is found to consist of mass fractions of 0.5 for b
    15·1 answer
  • Determine the design angle ϕ (0∘≤ϕ≤90 ∘) between struts AB and AC so that the 400 lb horizontal force has a component of 600 lb
    10·1 answer
  • Draw the six principal views of
    13·1 answer
  • (25%) A well-insulated compressor operating at steady state takes in air at 70 oF and 15 psi, with a volumetric flow rate of 500
    12·1 answer
  • Respond with TRUE if the symbol of the valve shown belows
    5·1 answer
  • Câu 1: Tìm từ trong 2 câu thơ sau liên quan đến các từ: hình chiếu, tia chiếu, mặt phẳng chiếu.
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!