Tag: C++

Declare a two-dimensional character array named “gasgiants” that is capable of storing the names of the gas giant planets of our solar system: jupiter, saturn, uranus, and neptune.

Declare a two-dimensional character array named “gasgiants” that is capable of storing the names of the gas giant planets of our solar system:  jupiter, saturn, uranus, and neptune.

LANGUAGE: C++ CHALLENGE: Declare a two-dimensional character array named “gasgiants” that is capable of storing the names of the gas giant planets of our solar system: jupiter, saturn, uranus, and neptune. Do not make the array any larger than it needs to be....

This content requires that you purchase additional access. The price is $2.99 or free for our Make Life Easier and 30 Days - Not Recurring members.

Purchase this Content ($2.99) Choose a Membership Level

Read More

Write the definition of a function isMultipleOf, that receives two integer arguments and returns true if the first argument is a multiple of the second. Otherwise false is returned.

Write the definition of a function isMultipleOf, that receives two integer arguments and returns true if the first argument is a multiple of the second. Otherwise false is returned.

LANGUAGE: C++ CHALLENGE: Write the definition of a function isMultipleOf, that receives two integer arguments and returns true if the first argument is a multiple of the second. Otherwise false is returned. So, if the arguments are 27 and 8 the function returns false because 27 is not a multiple of 8. But if the...

This content requires that you purchase additional access. The price is $2.99 or free for our Make Life Easier and 30 Days - Not Recurring members.

Purchase this Content ($2.99) Choose a Membership Level

Read More

Given that corpdata is an ifstream object that has been used for reading data and that there is no more data to be read, write the necessary code to complete your use of this object.

Given that corpdata is an ifstream object that has been used for reading data and that there is no more data to be read, write the necessary code to complete your use of this object.

LANGUAGE: C++ CHALLENGE: Given that corpdata is an ifstream object that has been used for reading data and that there is no more data to be read, write the necessary code to complete your use of this object....

This content requires that you purchase additional access. The price is $2.99 or free for our Make Life Easier and 30 Days - Not Recurring members.

Purchase this Content ($2.99) Choose a Membership Level

Read More

Given the availability of an ifstream object named input, write the other statements necessary to read an integer into a variable datum that has already been declared from a file called rawdata.

Given the availability of an ifstream object named input, write the other statements necessary to read an integer into a variable datum that has already been declared from a file called rawdata.

LANGUAGE: C++ CHALLENGE: Given the availability of an ifstream object named input, write the other statements necessary to read an integer into a variable datum that has already been declared from a file called rawdata. Assume that reading that one integer is the only operation you will carry out with this file. (Note: write just...

This content requires that you purchase additional access. The price is $2.99 or free for our Make Life Easier and 30 Days - Not Recurring members.

Purchase this Content ($2.99) Choose a Membership Level

Read More

Transient Population Populations are effected by the birth and death rate, as well as the number of people who move in and out each year.

Transient Population Populations are effected by the birth and death rate, as well as the number of people who move in and out each year.

LANGUAGE: C++ CHALLENGE: Transient Population Populations are effected by the birth and death rate, as well as the number of people who move in and out each year. The birth rate is the percentage increase of the population due to births and the death rate is the percentage decrease of the population due to deaths....

This content requires that you purchase additional access. The price is $2.99 or free for our Make Life Easier and 30 Days - Not Recurring members.

Purchase this Content ($2.99) Choose a Membership Level

Read More

Prime Numbers. Write a program that reads in an integer that is greater than 2 (let’s call it k) and finds and prints all of the prime numbers between 3 and k.

Prime Numbers.  Write a program that reads in an integer that is greater than 2 (let’s call it k) and finds and prints all of the prime numbers between 3 and k.

LANGUAGE: C++ CHALLENGE: Prime Numbers. Write a program that reads in an integer that is greater than 2 (let’s call it k) and finds and prints all of the prime numbers between 3 and k. A prime number is a number such that 1 and itself are the only numbers that evenly divide it (for...

This content requires that you purchase additional access. The price is $2.99 or free for our Make Life Easier and 30 Days - Not Recurring members.

Purchase this Content ($2.99) Choose a Membership Level

Read More

Write a full class definition for a class named GasTank, and containing the following members

Write a full class definition for a class named GasTank, and containing the following members

LANGUAGE: C++ CHALLENGE: Write a full class definition for a class named GasTank, and containing the following members: A data member named amount of type double. A constructor that accepts no parameters. The constructor initializes the data member amount to 0. A function named addGas that accepts a parameter of type double. The value of...

This content requires that you purchase additional access. The price is $2.99 or free for our Make Life Easier and 30 Days - Not Recurring members.

Purchase this Content ($2.99) Choose a Membership Level

Read More

Write a statement that declares a prototype for a function twice, which has an int parameter and returns an int.

Write a statement that declares a prototype for a function twice, which has an int parameter and returns an int.

LANGUAGE: C++ CHALLENGE: Write a statement that declares a prototype for a function twice, which has an int parameter and returns an int....

This content requires that you purchase additional access. The price is $2.99 or free for our Make Life Easier and 30 Days - Not Recurring members.

Purchase this Content ($2.99) Choose a Membership Level

Read More

Write a program that lets the user enter the total rainfall for each of 12 months into an array of doubles.

Write a program that lets the user enter the total rainfall for each of 12 months into an array of doubles.

LANGUAGE: C++ CHALLENGE: Write a program that lets the user enter the total rainfall for each of 12 months into an array of doubles. The program should calculate and display the total rainfall for the year, the average monthly rainfall, and the months with the highest and lowest amounts....

This content requires that you purchase additional access. The price is $2.99 or free for our Make Life Easier and 30 Days - Not Recurring members.

Purchase this Content ($2.99) Choose a Membership Level

Read More

Write the definition of a function minMax that has five parameters.

Write the definition of a function minMax that has five parameters.

LANGUAGE: C++ CHALLENGE: Write the definition of a function minMax that has five parameters. The first three parameters are integers. The last two are set by the function to the largest and smallest of the values of the first three parameters. The function does not return a value. The function can be used as follows:...

This content requires that you purchase additional access. The price is $2.99 or free for our Make Life Easier and 30 Days - Not Recurring members.

Purchase this Content ($2.99) Choose a Membership Level

Read More

Write a statement that declares a prototype for a function divide that takes four arguments and returns no value.

Write a statement that declares a prototype for a function divide that takes four arguments and returns no value.

LANGUAGE: C++ CHALLENGE: Write a statement that declares a prototype for a function divide that takes four arguments and returns no value. The first two arguments are of type int. The last two arguments arguments are pointers to int that are set by the function to the quotient and remainder of dividing the first argument...

This content requires that you purchase additional access. The price is $2.99 or free for our Make Life Easier and 30 Days - Not Recurring members.

Purchase this Content ($2.99) Choose a Membership Level

Read More

The speed of sound depends on the material the sound is passing through.

The speed of sound depends on the material the sound is passing through.

LANGUAGE:  C++ CHALLENGE: 4.18:The Speed of Sound The speed of sound depends on the material the sound is passing through. Below is the approximate speed of sound (in feet per second) for air, water and steel: air: 1,100 feet per second water: 4,900 feet per second steel: 16,400 feet per second Write a program that...

This content requires that you purchase additional access. The price is $2.99 or free for our Make Life Easier and 30 Days - Not Recurring members.

Purchase this Content ($2.99) Choose a Membership Level

Read More