378 Answered Questions for the topic C++

C++. Write a program that reads three integers from cin and outputs them in order from smallest to largest.

C++.Write a program that reads three integers from cin and outputs them in order from smallest to largest.Example: input of 3 8 5 should result in output of:3 5 8Hints: You do not have to actually... more

C++. An international phone call is billed by the minute according to this scheme: Calls up to 10 minutes cost a flat $5.

An international phone call is billed by the minute according to this scheme: Calls up to 10 minutes cost a flat $5. Calls over 10 minutes but less than 30 cost $.50 per minute. Calls 30 minutes or... more

In a dice game, you get the total you roll on two dice, unless they are the same, in which case you get double what they total. Write a program that helps score the game.

C++. In a dice game, you get the total you roll on two dice, unless they are the same, in which case you get double what they total. Write a program that helps score the game.Read in two integers... more

Orders from a company that cost $100 or more get a 10% discount. Orders less than $100 do not get a discount.

C++.Read in an decimal value representing the undiscounted order price, and print out what the order should cost.Just print the value - do not add a $ or try to make it look like... more

Read in a single integer from cin. If it is 7, output "Lucky". If it is not 7, output nothing.

C++#include <iostream>using namespace std;int main(){ //YOUR_CODE}

Your job is to implement the default (no argument) constructor that sets time to midnight. Hint: The constructor is going to need Time:: in front of its name.

Read the existing code for Time. It stores a time of day in 24 hour format with 0 hours indicating midnight and 12 hours indicating noon.Your job is to implement the default (no argument)... more

Replace YOUR_CODE with code that will create a point p2 that is 4 units to the right of p1 and 3 units below it.

Read the provided code for the Point class that represents a point on a standard Cartesian plane. Then read the provided code in main.Replace YOUR_CODE with code that will create a point p2 that is... more

The Rectangle class has been declared and main makes use of it. Add the function implementations so the code compiles and runs successfully.

The Rectangle class has been declared and main makes use of it. Add the function implementations so the code compiles and runs successfully.Hint: Every function name is going to need Rectangle:: in... more

Your job is to implement the constructor that takes an hour and minute value. Hint: The constructor is going to need Time:: in front of its name.

Read the existing code for Time. It stores a time of day in 24 hour format with 0 hours indicating midnight and 12 hours indicating noon.Your job is to implement the constructor that takes an hour... more

Your job is to implement the default (no argument) constructor that sets time to midnight. Hint: The constructor is going to need Time:: in front of its name.

Read the existing code for Time. It stores a time of day in 24 hour format with 0 hours indicating midnight and 12 hours indicating noon.Your job is to implement the default (no argument)... more

Replace YOUR_CODE with code that will create a point p2 that is 4 units to the right of p1 and 3 units below it.

Read the provided code for the Point class that represents a point on a standard Cartesian plane. Then read the provided code in main.Replace YOUR_CODE with code that will create a point p2 that is... more

Replace YOUR_CODE with code that will move Point p1 10 units to the right and 3 units down and Point p2 2 units to the left and 5 units up.

Read the provided code for the Point class that represents a point on a standard Cartesian plane. Then read the provided code in main.Replace YOUR_CODE with code that will move Point p1 10 units to... more

Replace YOUR_CODE with code that will create a point named p1 at the location 0, 0.

Read the provided code for the Point class that represents a point on a standard Cartesian plane. Then read the provided code in main.Replace YOUR_CODE with code that will create a point... more
C++

20d

how can I rewrite this code

void insertion_with_jumps(string a[], int n, int jump): Performs insertion sort on the given array using the given jump. This does not necessarily sort the array (unless the jump is 1) and is... more

C++ Factorial Problem using Vectors

I am new to C++ and am struggling with a recent practice problem, I have some code so far but can't figure out how to get the variable to update to correctly give the next factorial. Here is the... more

How to Call a Function from Another File and Then Print the Return of that Function? (C++)

Complete main() by inserting a new book into each list using the respective LinkedListLibrary and VectorLibrary InsertSorted() methods and outputting the number of operations the computer must... more

03/02/21

How to Use A Linked List to Build a List of Contacts? (C++)

You will be building a linked list. Make sure to keep track of both the head and tail nodes.(1) Create three files to submit. ContactNode.h - Class declaration ContactNode.cpp - Class... more

03/01/21

How Do I Output the Corresponding Contact Phone Number for an Inputted Contact Name? (C++)

Previously Queried Background Info:A contact list is a place where you can store a specific contact with other associated information such as a phone number, email address, birthday, etc. Write a... more
C++

02/28/21

How Can I Write a Program Adjusts A List By Normalizing Using Functions & Vectors? (C++)

When analyzing data sets, such as data for human heights or for human weights, a common step is to adjust the data. This can be done by normalizing to values between 0 and 1, or throwing away... more
C++

02/28/21

How Can I Write A Program That Outputs Values Below A Certain Amount Using Functions & Vectors? (C++)

Write a program that first gets a list of integers from input. The input begins with an integer indicating the number of integers that follow. Then, get the last value from the input, and output... more
C++

02/28/21

How Can I Write A Program That Sorts a Vector of Integer Values? (C++)

Write a program that gets a list of integers from input, and outputs the integers in ascending order (lowest to highest). The first integer indicates how many numbers are in the list. Assume that... more
C++

02/28/21

How Can I Write a Program For a Contact List Using Functions? (C++)

A contact list is a place where you can store a specific contact with other associated information such as a phone number, email address, birthday, etc. Write a program that first takes as input an... more
C++

02/28/21

How Can I Determine Whether the Values in a Vector are Odd or Even Using Functions? (C++)

Write a program that reads a list of integers, and outputs whether the list contains all even numbers, odd numbers, or neither. The input begins with an integer indicating the number of integers in... more

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.