Display all entries in order by ascending number of atoms

Assignment Help C/C++ Programming
Reference no: EM13938958

We have been given a file of chemical formulae, specifically hydrocarbons that consist of only hydrogen and carbon atoms.

Each line of the file contains the name of the chemical followed by its molecular formula in the form C#H# where # is the number of carbon (C) and hydrogen (H) atoms. No name in the file contains blanks.

Because hydrocarbons with the same molecular formula can appear in many structural forms and each of the forms has a different name, the same molecular formula might appear more than once in the file with different names. (e.g.: Butane and 2-methylpropane both have the molecular formula C4H10.)

We would like to keep one entry for each unique molecular formula along with all the names for that formula and then display all these entries in order by ascending number of carbon atoms.

Please refer to the attachment for further details.

Attachment:- rec2h.docx

Reference no: EM13938958

Questions Cloud

Calculate the consumption ratios for the four drivers : Calculate the consumption ratios for the four drivers. Is there evidence of product diversity? Explain. Calculate the activity rates that would be used to assign costs to each product.
Debit or a credit to increase each of the accounts : The first assignment asks you to classify a set of accounts into one of the A L W I R E categories. Only after you have made that determination can you go on to the second assignment and answer the question as to whether to use a Debit or a Credit to..
What abnormal spinal curvature will result : Tom was advised by his doctor to lose weight and start jogging. He began to jog daily. On the sixth day, he was forced to jump out of the way of a speeding car. He heard a snapping sound that was immediately followed by pain in his right lower cal..
Compute activity rate for plastic injection molding activity : Calculate the activity rate for the plastic injection molding activity. Calculate the activity rate for the decal application activity.
Display all entries in order by ascending number of atoms : We have been given a file of chemical formulae, specifically hydrocarbons that consist of only hydrogen and carbon atoms.
Symptoms in degeneration of upper motor neurons : lease select 3 out of the 4 questions below to answer. Each answer should have between 70-150 words. 1. Explain the difference between the symptoms in degeneration of Upper motor neurons and lower motor neurons.
Luthuli electronics ltd. commenced business : Luthuli Electronics Ltd. commenced business on 1 April 1999, selling television sets both on a cash basis and by instalments.  Hire purchase sales require a deposit of one-third of the cash selling price with the balance payable in 18 equal monthly i..
What is the effect of aging on skeletal muscles : What is responsible for the banding pattern seen in skeletal muscle cells? What is the functions of tendons? How is a tendon different from an aponeurosis? How is it similar?
How to operate successfully in an international environment : Your guiding question is -how to operate successfully in an international environment?? The first part will be a case study focusing on a strategic problem,

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Add a copy constructor

Take the code below and add a copy constructor, assignment operator definition and destructor to the class. These functions have already been started for you.

  Exponent and significant of a floating point

Write a program that requires the number of bits for the exponent and significant of a Floating Point representation; then requires two decimal real numbers and an operation either sum, subtraction or multiplication.

  A store with a bag of groceries

write C++ statements that remove all the items from storeBag and place them into one of two new bags, as follows: Place all occurrences of bread and eggs into fragileBag, and all other items into groceryBag. When you are done, storeBag should be empt..

  Find the moment of inertia

Display a brief description of the program and ask the user to specify the type of loading (end load, intermediate load, uniform load)

  Struct definition to represent the data of a person''s bank

Define a struct definition to represent the data of a person's bank account. There will be one string for the name, and two doubles for balance and interest rate. Declare two variables of this new type in the main function. Modify the values of each ..

  How the function delete can be implemented for arrays

Explain in details how the function Delete() can be implemented for arrays to function exactly as it would with lists. Use pseudo code to clarify your explanation.

  Prepare a program for a company named retail-martbullprompt

prepare a program for a company named retail-mart.bullprompt the user to enter an item name one word only a quantity

  Please low is studentgrade class problem

1.Please low is StudentGrade class problem, please modify it so that all methods are marked const that can be. Make sure you have a constructor that accepts all data values. Create a simple main function that declares a constStudentGrade object and d..

  Calculate the volume flow rate in cubic feet

Write a program to calculate the volume flow rate in cubic feet per second of water flowing through a pipe of diameter d in inches and a velocity of v feet per second. The formula for the flow rate is given by: Where area = ?d^2 / 4 equation in sq..

  Which respectively represent the name of the flower

Write a C++ class, Flower, that has three member variables of type string, int, and float, which respectively represent the name of the flower, its number of pedals, and price.

  Write function compute square root together with prototype

Write a C++ function called compute together with its prototype that is passed 2 integers, A and B and returns the square root of A2+B2 ,as a double.

  Demonstrate your code compiles and runs for a test case

Use a For loop to iterate through the array and input the values. Demonstrate your code compiles and runs for a test case of your choice.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd