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
A chemical reaction occurs. Which of the following would indicate that energy is transformed during the reaction?
weqwewe [10]
The answer would be 4. All of the above

4 0
3 years ago
Read 2 more answers
A 60-kg rollerblader rolls 10 m down a 30? incline. When she reaches the level floor at the bottom, she applies the brakes. The
VARVARA [1.3K]

Answer:

s = 20 m

Explanation:

given,

mass of the roller blader = 60 Kg

length = 10 m

inclines at = 30°

coefficient of friction = 0.25

using conservation of energy

\dfrac{1}{2}mu^2 = m g d sin \theta

u^2 = 2 g d sin30^0

u= \sqrt{2\times 9.8 \times 10 sin30^0}

u = 9.89 m/s

Using second law of motion  

ma =μ mg

a = μ g

a = 0.25 x 9.8

a = 2.45 m/s²

Using third equation of motion ,  

v² - u² = 2 a s

0² - 9.89² = 2 x 2.45 x s

s = 20 m

the distance moved before stopping is 20 m

3 0
3 years ago
Ayuda por favor (archivo adjunto) con un ejercicio de expresión sobre periodo de oscilación de esta figura:
vodka [1.7K]

Answer:

nolo se

Explanation:

no lo se

8 0
3 years ago
Comets travel around the sun in elliptical orbits with large eccentricities. If a comet has speed 1.6×104 m/s when at a distance
xz_007 [3.2K]

Answer:

v₂ = 7.6 x 10⁴ m/s

Explanation:

given,

speed of comet(v₁) = 1.6 x 10⁴ m/s

distance (d₁)= 2.7 x 10¹¹ m

to find the speed when he is at distance of(d₂) 4.8 × 10¹⁰ m

v₂ = ?

speed of planet can be determine using conservation of energy

K.E₁ + P.E₁ = K.E₂ + P.E₂

\dfrac{1}{2}mv_1^2-\dfrac{GMm}{r_1} = \dfrac{1}{2}mv_2^2-\dfrac{GMm}{r_2}

\dfrac{1}{2}v_1^2-\dfrac{GM}{r_1} = \dfrac{1}{2}v_2^2-\dfrac{GM}{r_2}

v_2^2= v_1^2 + \dfrac{2GM}{r_2}-\dfrac{2GM}{r_1}

v_2= \sqrt{v_1^2 +2GM(\dfrac{1}{r_2}-\dfrac{1}{r_1})}

v_2= \sqrt{(1.6\times 10^4)^2 +2\times 6.67 \times 10^{-11}\times 1.99 \times 10^{30}(\dfrac{1}{4.8\times 10^{10}}-\dfrac{1}{2.7\times 10^{11}})}

v₂ = 7.6 x 10⁴ m/s

3 0
3 years ago
How does cell transport make cellular respiration and photosynthesis work?
Aloiza [94]

Answer:

okjjjjkkkkjjjjhhjjikhggbvvh

4 0
3 years ago
Other questions:
  • Which subatomic particle will you add or remove from an atom to create a new element?
    5·1 answer
  • An electron is moving at a speed of 4.8 × 10 6 m/s at an angle of 30.0° with respect to a uniform magnetic field of 9.2 × 10 –4
    6·1 answer
  • What is the current I(3τ), that is, the current after three time constants have passed? The current in the circuit will approach
    14·1 answer
  • Why are vectors so important?
    13·1 answer
  • More pts first 2 so hurry up
    5·2 answers
  • Physical science challenge me to​
    15·1 answer
  • Where in the cell can you find the location of inherited traits?
    5·2 answers
  • find the following Distance, Time, and Velocity in the problem; a track runs a 100-m dash in 11 seconds. What is his average vel
    6·1 answer
  • How does a plane mirror work
    6·1 answer
  • The total length of the wire of potentiometer is 10m. A potential gradient of 0.0015 V/cm is obtained when a steady current is p
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!