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
A binary geothermal power plant uses geothermal water at 160°C as the heat source. The cycle operates on the simple Rankine cycl
bogdanovich [222]

A binary geothermal power operates on the simple Rankine cycle with isobutane as the working fluid. The isentropic efficiency of the turbine, the net power output, and the thermal efficiency of the cycle are to be determined

Assumptions :

1.  Steady operating conditions exist.

2.  Kinetic and potential energy changes are negligible.

Properties:  The specific heat of geothermal water ( c_{geo}[) is taken to be 4.18 kJ/kg.ºC.  

Analysis (a) We need properties of isobutane, we can obtain the properties from EES.

a. Turbine

PP_{3} = 3.25mPa = (3.25*1000) kPa\\= 3250kPa\\from the EES TABLE\\h_{3} = 761.54 kJ/kg\\s_{3} = 2.5457 kJ/kg\\P_{4} = 410kPa\\\\s_{4} = s_{3} \\h_{4s} = 470.40kJ/kg\\\\T_{4} = 179.5^{0} C\\\\h_{4} = 689.74 kJ/KG\\\\ The  isentropic  efficiency, n_{T} = \frac{h_{3}-h_{4}  }{h_{3}- h_{4s} }

==\frac{761.54-689.74}{761.54-670.40} \\=\frac{71.8}{91.14} \\=0.788

b. Pump

h_{1} = h_{f} @ 410kPa = 273.01kJ/kg\\v_{1} = v_{f} @ 410kPa = 0.001842 m^{3}/kgw_{p,in} =  \frac{v_{1}(P_{2}-P_{1})   }{n_{p} } \\\\= \frac{0.01842(3250-410)}{0.9} \\\\ =5.81kJ/kg\\h_{2} =h_{1} + w_{p,in}\\          = 273.01+5.81\\           = 278.82 kJ/kg\\\\w_{T,out} = m^{.}  (h_{3} -h_{4} )\\=(305.6)(761.54-689.74)\\=305.6(71.8)\\=21,942kW\\\\

W^{.} _ {P,in} = m^{.} (h_{2} -h_{1}) \\=m^{.}  w_{p,in \\=305.6(5.81)\\\\=1,777kW\\W^{.}  _{net} = W^{.} _{T, out} - W^{.}  _{P,in} \\= 21,942-1,777\\=20,166 kW\\\\HEAT EXCHANGER\\\\Q_{in} = m^{.} _{geo} c_{geo} (T_{in-T_{out} } )\\=555.9(4.18)(160-90)\\=162.656kW\\

c. The thermal efficiency of the cycle  n_{th}  =\frac{W^{.} _{net} }{Q^{._{in} } } \\\\= \frac{20,166}{162,656} \\=0.124\\=12.4%

7 0
4 years ago
Read 2 more answers
A steel plate has a hole drilled through it. The plate is put into a furnace and heated. What happens to the size of the inside
djverab [1.8K]

Answer:

The diameter increases

Explanation:

The expansion in the metal is uniform in every dimension

4 0
3 years ago
The period of an 800 hertz sine wave is
sukhopar [10]

Explanation:

White Board Activity: Practice: A sound has a frequency of 800 Hz. What is the period of the wave? The wave repeats 800 times in 1 second and the period of the function is 1/800 or 0.00125.

3 0
3 years ago
Rosita is planning an investigation to determine how a lifeboat's shape affects its
KiRa [710]
Yes! Is right, just did the work!
3 0
3 years ago
PLZZ HELP
9966 [12]

Answer:

Could ask a family member to help

Explanation:

5 0
3 years ago
Read 2 more answers
Other questions:
  • Which of the following does NOT describe product design.
    11·1 answer
  • The purpose of daytime running lights (DRLs) is to _____.
    5·2 answers
  • 5) Two concentric spheres of diameter D1= 70 cm and D2= 120 cm are separated by an air space and have surface temperatures of T1
    13·1 answer
  • A football player attempts a 30‐yd field goal. If he is able to impart a velocity u of 100 ft/sec to the ball, compute the minim
    6·1 answer
  • Water enters an ice machine at 55°F and leaves as ice at 25°F. If the COP of the ice machine is 2.45 during this operation, dete
    7·1 answer
  • An undeformed specimen of some alloy has an average grain diameter of 0.050 mm. You are asked to reduce its average grain diamet
    11·1 answer
  • If you are involved in a collision and your vehicle is blocking the flow of traffic, you should
    5·1 answer
  • Provide two programming examples in which multithreading provides better performance than a single-threaded solution. Provide on
    11·1 answer
  • a coiled spring is stretched 31.50 cm by a 2.00N weight. How far is it stretched by a 10.00 N weight?
    6·1 answer
  • QUICK ASAP!!!
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!