Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

How do I code a program that calculates the molecular weight and average weight of a compound depending on how many oxygens, carbons, nitrogens, sulfurs,

How do I code a program that calculates the molecular weight and average weight of a compound depending on how many oxygens, carbons, nitrogens, sulfurs, and hydrogens the user inputs?

-It needs three decimal precision

  • The program should ask the user if they want to calculate the weights for another amino acid and exit when the user finally says "No" is some form.
    • Use a do while loop to achieve this
image text in transcribed
Table 2: Molecular Weights Element Atomic Weight Oxygen 15.9994 Carbon 12.01 1 Nitrogen 14.00674 Sulfur 32.066 Hydrogen 1.00794 (unit is u, which is 'atomic mass unit')

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Programming questions

Question

=+ Describe how automatic stabilizers work.

Answered: 1 week ago

Question

Explain the process of biochemistry

Answered: 1 week ago