Writer a program that allows the user to enter

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

Writer a program that allows the user to enter an unknown number of characters, stores those characters in a data structure (a vector) and then prints the values to the screen.

an example :

witness my exciting first use of vectors!

Enter as many letter as you like, enter ! to quit.

enter a letter: b

enter a letter: u

enter a letter: r

enter a letter: r

enter a letter: p

enter a letter: !

Great! you entered: burrp

The frist character is : b

The last character is : p

 

 

 

Note: the exclamation point was never stored in the vector.

Goal: recognize that vector objects allow greater flexibility that arrays and how to use a vector in a program.

you do not need to specify size when using vectors.

 

 

Reference no: EM13168660

Questions Cloud

What are the approximate percentages of each : the atomic mass of chlorine is listed as 35.454 amu on the periodic table. it has two naturally occurring isotopes, Cl-35 and Cl-37. what are the approximate percentages of each?
Compute the work done by the helium gas : The temperature is held at 271 K. Calculate the work done by the gas(in joules). to give the appropriate sign
Find the volume of hydrogen evolved : Find the volume of hydrogen evolved when 3.25g of zinc granules react completely with excess hydrochloric acid solution (Zn=65)
What is the specific gravity of this mineral : What is the hardness of this mineral? What is the specific gravity of this mineral? show your calculations. Using all these properties, identify this mineral?
Writer a program that allows the user to enter : Writer a program that allows the user to enter an unknown number of characters, stores those characters in a data structure (a vector) and then prints the values to the screen.
Determine the number of moles of oxygen that react complete : Determine the number of moles of oxygen that react completely with 8.0 moles of C2H6 based on the following balanced equation.
State an enzyme-catalyzed reaction produces a product : An enzyme-catalyzed reaction produces a product that has a maximum absorbance at 412 nm. The extinction coefficient is 4000 M^-1 cm^-1. A 10-to-1 dilution of the enzyme is made and 20 microliter of the dilution are put into a cuvette with 80 micro..
Compute the binding energy of electrons : the maximum velocity of the ejected electrons is 3.45 multiplied by 105 m/s. Calculate the binding energy of electrons to the magnesium surface.
What is the volume of the hydrogen gas : what is the volume of the hydrogen gas (at25oC and 100KPA) needed to produce 51.1g of ammonia?

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Class named realestate that has data members

Create a class named RealEstate that has data members to hold the price of a house, the number of bedrooms, and the number of baths. Member functions include overloaded insertion and extraction operations

  Random permutations

Write a program in C++ that gives a prompt to the users, asking for an integer M.It then prints out a M different random permutations, one on each of M lines, of the numbers 1, 2, ... , 10, separated by spaces or tabs.

  A pattern detector has an input

A pattern detector has an input a 4 x 4 matrix whose elements take values a, b, c, or d. The output is 1 if the matrix contains one b surrounded by eight a's and 0 otherwise.

  It would be cool if a device was actually part

Have you ever been low on cash and couldn't go beyond a certain dollar limit when shopping? You sort of need a calculator in your head. It would be cool if a device was actually part of the cart and as you add an item into the cart it would increm..

  Write function that randomly produces maze

Write a function mazeGenerator that randomly produces a maze (in C++). The Function should take as arguments a two-dimensional 12-by-12 character array.

  In c++, write a program that calculates 10,000 tries.

In C++, write a program that calculates 10,000 tries. These tries are based upon a rat trying to escape from a maze. Keep adding minutes until the rat is free and when he is free that is 1 try so we need 10,000. We start by randomly generating a numb..

  Write function to find whether number is perfect number

Write down the function perfect which determines whether number is perfect number or not. This function must receive number and return true if number is perfect.

  Create a program that will round a floating point

Create a program that will round a floating point value to a specified number of decimal places as input by the user. To perform the actual calculation, write a function that takes the user's value and the number of decimal places as input paramet..

  The definition for a printallplayers() function

Add the Prototype, a call and the definition for a printAllPlayers() function that prints to STDOUT (using cout) each players name and all of their at-bat stats. Only print out the values of the stats array up to timesAtBat.

  Write an lc-3 machine language program

Write an LC-3 machine language program starting at location x3000 which divides the number in memory location x4000 by the number in memory location x4001 and stores the quotient at x5000 and the remainder at x5001.

  You should use pure recursive calls

You should use pure recursive calls completely and count the number of calls the program makes. You should count how many times recursive calls were made.

  Write a function that computes length of a character string

Write a function that computes the length of a character string (i.e. write your own implementation of the strlen function.

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