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
mojhsa [17]
3 years ago
6

Create a file "parts_inv.dat" that stores on each line a part number, cost, and quantity in inventory, in the following format:1

23 5.99 52Use fscanfto read this informationand print the total dollar amount of inventory (the sum of the cost multiplied by the quantity for each part).
Physics
1 answer:
andriy [413]3 years ago
7 0

Answer:

%Open the file.

fID = fopen('parts_inv.dat');

%Read from the file.

data = fscanf(fID,'%d\t%f\t%d',[3,inf]);

%Close

fclose(fID);

%Restore the data.

data = data';

%Get the size

[rs, cs] = size(data);

%Set value.

invCost = 0;

%Loop

for rw = 1 : rs

%Find cost

invCost = invCost + (data(rw, 2) * data(rw, 3));

%Loop end

end

%Display the cost.

fprintf('Total cost: %4.2f\n\n', invCost);

Explanation:

You might be interested in
How does a pedometer help people reach their fitness goals?
Greeley [361]

Answer:

Pedometers are designed to detect vertical movement at the hip and so measure the number of steps and provide an estimate of distance walked. They cannot provide information on the temporal pattern of physical activity or the time spent in different activity at different intensity.

5 0
2 years ago
If a boat and its riders have a mass of 900 kg and the boat drifts in at 1.4 m/s how much work does sam do to stop it?
Rama09 [41]
The initial kinetic energy of the boat and its rider is
K_i =  \frac{1}{2} mv_i^2 =  \frac{1}{2}(900 kg)(1.4 m/s)^2=882 J

After Sam stops it, the final kinetic energy of the boat+rider is
K_f = 0 J
because its final velocity is zero.

For the law of conservation of energy, the work done by Sam is the variation of kinetic energy of the system:
W=K_f-K_i =0-882 J=-882 J
where the negative sign is due to the fact that the force Sam is applying goes against the direction of motion of the boat.
6 0
3 years ago
A satellite s is moving in an elliptical orbit around the earth . the mass of satellite is very small compared to mass of earth.
Contact [7]
The best and most correct answer among the choices provided by your question is the second choice or letter B.

<span>A satellite (s) is moving in an elliptical orbit around the earth has its angular momentum towards the earth changing in direction, but not in magnitude.</span>

I hope my answer has come to your help. Thank you for posting your question here in Brainly. We hope to answer more of your questions and inquiries soon. Have a nice day ahead!
8 0
3 years ago
A system undergoes a two-step process. In the first step, the internal energy of the system increases by 222 J when 150 J of wor
joja [24]

Answer:0 J

Explanation:

Given

For first step

change in internal Energy of the system is \Delta U_1=222 J

Work done on the system W_1=-150 J

For second step

change in internal Energy of the system is \Delta U_2=123 J

Work done on the system W_2=-195 J

Work done on the system is considered as Positive and vice-versa.

and from first law of thermodynamics

Q=\Delta U+W

for first step

Q_1=222-150=72 J

Q_2=123-195=-72 J

overall heat added=Q_1+Q_2

Q_{net}=72-72 =0

For overall Process Heat added is 0 J

8 0
3 years ago
Estimate the wavelength corresponding to maximum emission from each of the following surfaces: the sun, a tungsten filament at 2
igomit [66]

Answer

Applying Wein's displacement

\lamda_{max}\ T = 2898 \mu_mK

1) for sun T = 5800 K

      \lambda_{max} = \dfrac{2898}{5800}

      \lambda_{max} = 0.5 \mu_m

2) for tungsten T = 2500 K

      \lambda_{max} = \dfrac{2898}{2500}

      \lambda_{max} = 1.16 \mu_m

3) for heated metal T = 1500 K

      \lambda_{max} = \dfrac{2898}{1500}

      \lambda_{max} = 1.93 \mu_m

4) for human skin T = 305 K

      \lambda_{max} = \dfrac{2898}{305}

      \lambda_{max} = 9.50 \mu_m

5)  for cryogenically cooled metal T = 60 K

      \lambda_{max} = \dfrac{2898}{60}

      \lambda_{max} = 48.3 \mu_m

range of different spectrum

UV ----0.01-0.4

visible----0.4-0.7

infrared------0.7-100

for sun T = 5800

λ              0.01           0.4               0.7                 100

λT             58           2320            4060             5.8 x 10⁵

F                0             0.125             0.491                1

fractions

for UV = 0.125  

for visible = 0.441-0.125 = 0.366

for infrared = 1 -0.491 = 0.509  

8 0
3 years ago
Other questions:
  • PLEASE HELP ME!! a police car moves at a speed of 30m / s, the driver is at a single-note frequency of 650Hz It is heard. One of
    10·1 answer
  • which of the following is a benefit of the atmosphere? the atmosphere provides us with water to drink. the atmosphere provides t
    13·2 answers
  • how can the thumb and fingers of your right hand be used to identify the direction of a magnetic field?
    11·1 answer
  • What is true when an object is moved farther from a plane mirror?
    13·1 answer
  • If an applied force of 20 N to the East on a 4 kg object results in change in velocity of 5 m/s per second which equation is nee
    11·1 answer
  • What do sound and light waves do when bouncing off objects
    12·1 answer
  • When a metal element bonds with a non mental element they are known as ____ bond
    15·1 answer
  • 50 points question (Who is known as father of science)Albert Einstein​
    6·2 answers
  • Which is a unit for time? a) kilometers b) meters c) days d) meters/second
    14·1 answer
  • (50 POINTS) What types of transportation have been modified over the years to decrease
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!