Category: Learn To Code

Write the definition of a function called product.

Write the definition of a function called product.

LANGUAGE: C++ CHALLENGE: Write the definition of a function called product . The function receives two int parameters. You may assume  that neither parameter  is negative. The function returns the product  of the parameters . So, product (3,5) returns 15 and product (30,4) returns 120. The function must not use a loop of any kind...

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 function called fact that recursively calculates the factorial value of its single int parameter.

Write a function called fact that recursively calculates the factorial value of its single int parameter.

LANGUAGE: C++ CHALLENGE: Write a function called  fact that recursively calculates the factorial value  of its single int parameter. The value  returned by  fact is a  long .....

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

Read two text files into arrays and query the arrays for boy and girl names

Read two text files into arrays and query the arrays for boy and girl names

LANGUAGE: C++ CHALLENGE: Read in boynames.txt and girlnames.txt into separate arrays and search by the user entered boy name or girl name. The most popular names are listed first and the least popular names are listed last. write a program that allows the user to input a name. The program should then read from 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

Read in string and evaluate for word count and letter occurrences

Read in string and evaluate for word count and letter occurrences

LANGUAGE: C++ CHALLENGE: Write a program that will read in a line of text and output the number of words in the line and the number of occurrences of each letter. Define a word to be any string of letters that is delimited at each end by either a whitespace, a period, a comma, or 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

C++ Sort Array in ascending Order

C++ Sort Array in ascending Order

LANGUAGE: C++ CHALLENGE: Write a function, sort, that accepts an array  of integers , and the number of elements  in the array  and sorts the array  in ascending order (basic sort)...

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

C++ Define a class called Odometer that will track fuel and mileage for an automotive vehicle.

C++ Define a class called Odometer that will track fuel and mileage for an automotive vehicle.

LANGUAGE: C++ CHALLENGE: C++ Define a class called Odometer that will track fuel and mileage for an automotive vehicle. The class should have member variables to track the miles driven and the fuel inefficiency of the vehicle in miles per gallon. Include a mutator function to reset the odometer to zero miles, a mutator function...

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

C++ Read In Array with Fewer than 50 integers, sort, print Unique numbers and there number of occurrences.

C++ Read In Array with Fewer than 50 integers, sort, print Unique numbers and there number of occurrences.

LANGUAGE: C++ CHALLENGE: C++ Write a program that reads in an array of type int. You may assume that there are fewer than 50 entries in the array. Your program determines how many entries are used. The output is to be a two-column list. the first column is a list of the distinct array elements;...

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