Hydrogen and oxygen make two compounds: water, with a mass ratio of , and hydrogen peroxide, with . You will make the program find the percentage of hydrogen in each, the oxygen in of hydrogen peroxide, and how many times as much oxygen hydrogen peroxide has for the same mass of hydrogen. Then it draws the percentages.
The idea. In a compound the ratio is fixed. With a ratio , hydrogen is of the mass.
Your tasks.
pc, the percentage of hydrogen in each compound.oxygen50, the grams of oxygen in of hydrogen peroxide.times, the oxygen in hydrogen peroxide divided by the oxygen in water, for of hydrogen.Have you tried it?
Do the tasks in the editor first, and run the checker after each one. Its hints help when a check fails. When you are ready, compare your code with this solution.
Log in to join the discussion.
Loading…