Write a function called exchange
that receives two char
s and permanently exchanges their values so each one has the value that the other...
Search Results
Searching for: C++
Individual Exercises
Complete the function toggleAvailability
that toggles the availability
of the parameter apartment
and updates it so that if it was...
Create a struct called color
that holds three member integers called red
,green
, and blue
.
Consider already having a class called gradebook
that manages a student's grades for a class, but you want to define the following member...
Consider already having a class called gradebook
that manages a student's grades for a class, but you want to define the following member...
Complete the while loop so that the variable repetition
keeps track of how many times the first character in word
is repeated in a row at...
Given a current
temperature and the desired minimum
temperature, keep increasing current
by 0.5
degrees until it has either reached or...
Given an integer month_number
, complete the function using a switch statement so that the string month_name
is assigned the name of the...
Complete the function using a switch statement so that the variable am_pm
is assigned the value 'A'
if hour
corresponds with any hour...
Complete the function that takes two unsigned integers and calculates the exponentiation of base
raised to the power of power
and returns...
Complete the function that receives an unsigned integer and creates a string that repeats a laugh as many times as specified by the...
We have a program that keeps track of the hours someone sleeps each night, with an array of seven integers that represent each day of the...
The function maximize
receives two integers and updates them so that they both hold the value of the greater of the two. It also helps...
Write a function called school
that takes a string
that represents the day of the week and displays the corresponding message:
- monday:...
Write a recursive function called add_digits
that will receive a positive number and returns the sum of each of digits. For example,...
Write a recursive function called half_left
that will receive a measurement of the amount of a chemical that is decaying. The amount will...
Write a recursive function called is_increasing
that will receive a vector of integers called list and determine whether or not it is...
Write a program that stores the following information about a soccer player in variables with the following identifiers and corresponding...
Write a program that makes a decision and does something so that if the input is 1
the output is 0
and vice versa.
Write the code that...
Write a program that prompts the user to login, and displays appropriate messages according to whether the details are correct, partially...
Write a program that prompts the user:
"How many degrees is it inside today? "
and then starting at that number entered, displays the...
Complete a program to encourage the user to do their chores before going to sleep. Begin by prompting the user Did you clean your room?...
Create a program that asks the user "In one word, how do you feel?\n"
and then gathers the user's response.
When the user enters either ...
Complete a program to simulate an echo. It should display "Hello! \n"
five times, but using only a single cout
statement with a for loop....
Complete a program to enter and show a list of exercises.
Prompt the user with "Hello! what is your workout schedule? (say 'done' to end...