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]
4 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]4 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
Which two technologies use the same range of radio wave frequencies? television broadcasting and AM radio broadcasting cell phon
Tju [1.3M]
Let us reject some answers. AM and FM radio waves do not interfere. Am are an orders of magnitude larger than FM waves. FM waves belong to microwaves, a subcategory of radiowaves while AM does not. Similarly, AM  and TV have not the same, because TV uses a subset of the frequencies used in FM. The correct answe is that CB radios and submarine communication happen at the same wavelengths/frequencies, namely low frequency radiowaves.
4 0
4 years ago
Read 2 more answers
HELP DUE 3 MINUTESSSSD
Delvig [45]

Answer:

Break down small pebbles and sediments, like sand

Break down large rocks like mountains

Explanation:

6 0
3 years ago
How does heat conduction work
Musya8 [376]
Heat energy can move through a substance by conduction. Metals are good conductors of heat, but non-metals and gases are usually poor conductors of heat. Poor conductors of heat are called insulators. Heat energy is conducted from the hot end of an object to the cold end.
4 0
4 years ago
Read 2 more answers
Which of the following statements is FALSE about collisions? (Consider Newton's Laws an the Conservation of Momentum.)
pantera1 [17]

<u>The following statements are false about collisions: </u>

  • The velocity change of two respective objects involved in a collision will always be equal.
  • Total momentum is always conserved between any two objects involved in a collision.

Answer: Option B, and D

<u>Explanation: </u>

In any collisions, equal amount of net force will be acted upon the colliding objects due to the third law of Newton, irrespective of the significance difference in mass of the objects. Similarly, they can also have different acceleration values during collision of two objects if the masses are identical.

But the statements regarding the equal change in velocity of two objects respectively involved in collision always is false, as the conservation of momentum is applicable for isolated system only. So it is true for only isolated system and not in all the systems.

The same reason goes for falsifying the fourth statement which states that total momentum is always conserved between two objects involved in a collision as this statement is only true for isolated system where the conservation of momentum can be applied. Thus the second and fourth statement is false regarding collision.

8 0
3 years ago
1. A single coin is flipped four times. What do you think is the most likely outcome?
mel-nik [20]

Answer:F. all are equally likely

Explanation:

F. because there is no way to tell if or what the persentage of tails to heads could be.

6 0
2 years ago
Other questions:
  • A turtle takes 3.5 minutes to walk 18 m toward the south along a deserted highway. A truck driver stops and picks up the turtle.
    11·1 answer
  • What is another term means balance in physics?
    15·2 answers
  • If the velocity of blood flow in the aorta is normally about 0.32 m/s, what beat frequency would you expect if 4.40-MHz ultrasou
    12·1 answer
  • A plane flies 1800 miles in 9 ​hours, with a tailwind all the way. the return trip on the same​ route, now with a​ headwind, tak
    10·1 answer
  • Salmon often jump waterfalls to reach their breeding grounds.
    12·1 answer
  • A Gaussian surface in the form of a hemisphere of radius R = 5.51 cm lies in a uniform electric field of magnitude E = 1.08 N/C.
    11·1 answer
  • Convert 45km to miles show your work
    6·1 answer
  • What are the difference between copper and sodium once you put it to flame?
    13·1 answer
  • Natural Resources Question 5
    15·1 answer
  • how might have atomic numbers of elements indicate that newly discovered elements would have to have very high atomic numbers
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!