On a breadth first search traversal of the graph shown below, and starting at node a, the first three nodes visited are:
Search Results
Individual Exercises
On a depth first search traversal of the graph shown below, and starting at node a, the first three nodes visited are:
Write a function called school
that takes a string
that represents the day of the week and displays the corresponding message:
- monday:...
Below is a class that represents the numbers picked on a lottery ticket.
public class LotteryTicket { private int[] numbers; // your...
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...
Complete the calculatePrice
function so that each item in the provided cart
added to the total price. Any item that is "milk"
costs $2.50...
This is a test
Follow Destiny's demonstration and define a function called editYes
that receives a parameter passed-by-reference that is of type ...
Follow Kevin's demonstration and create a program that reads from a file called contacts
that includes contact information. Each line has...
Write a function called file_exists
that receives the name of a file as a string
and determines whether or not that file exists, based on...
Follow Kevin's example and create a function called add_student_to_roster
that receives:
- a student's name
- their identification number
...
Write a function called save_stickynote
that receives:
- the name of a file to save, as a
string
- a text note of information to save,...
Recursive procedure that returns the number of H in a string of heads (H) or tails (T) outcomes. This must be a recursive routine. You...
Code along with Jessica's example and implement the algorithm that does the following:
- Prompts the user for
"\nwhat is the name of the...
Define a struct called Instrument
to describe a musical instrument with the following attributes:
-
name
- a word that the instrument is...