Starting Out with C++ from Control Structures to Objects (9th Edition)
Starting Out with C++ from Control Structures to Objects (9th Edition)
9th Edition
ISBN: 9780134498379
Author: Tony Gaddis
Publisher: PEARSON
bartleby

Videos

Textbook Question
Book Icon
Chapter 10.4, Problem 10.10CP

When complete, the following program skeleton will search for the string “Windy” in the array place. If place contains “Windy” the program will display the message “Windy found.” Otherwise, it will display “Windy not found.”

#include <iostream>

// include any other necessary header files

using namespace std;

int main()

{

char place[] = "The Windy City";

// Complete the program. It should search the array place

// for the string "Windy" and display the message "Windy

// found" if it finds the string. Otherwise, it should

// display the message "Windy not found."

return 0;

}

Blurred answer
Students have asked these similar questions
C++ arrays task The scientist monitors the movement of a particle suspended on the surface of the water and records its coordinates every n seconds. make a program that calculates the minimum, average, and maximum velocities of the particle and the distance traveled by the particle. The first line of the original data file contains the number of particle coordinates m (1 <m <100) and the coordinate capture interval in n (n> 0) seconds. The following lines show the particle coordinates xi and yi (1 <i <m) in millimeters (xi and yi are real numbers). Record the minimum, average, and maximum velocities of the particle and the distance traveled by the particle in the result file.
// MichiganCities.cpp - This program prints a message for invalid cities in Michigan.   // Input:  Interactive // Output:  Error message or nothing #include <iostream> #include <string> using namespace std; int main()  {    // Declare variables    string inCity;   // name of city to look up in array    const int NUM_CITIES = 10;    // Initialized array of cities    string citiesInMichigan[] = {"Acme", "Albion", "Detroit", "Watervliet", "Coloma", "Saginaw", "Richland", "Glenn", "Midland", "Brooklyn"};     bool foundIt = false;  // Flag variable    int x;         // Loop control variable    // Get user input    cout << "Enter name of city: ";    cin >> inCity;        // Write your loop here             // Write your test statement here to see if there is        // a match.  Set the flag to true if city is found.                              // Test to see if city was not found to determine if     // "Not a city in Michigan" message should be printed.…
// MichiganCities.cpp - This program prints a message for invalid cities in Michigan.   // Input:  Interactive // Output:  Error message or nothing #include <iostream> #include <string> using namespace std; int main()  {    // Declare variables    string inCity;   // name of city to look up in array    const int NUM_CITIES = 10;    // Initialized array of cities    string citiesInMichigan[] = {"Acme", "Albion", "Detroit", "Watervliet", "Coloma", "Saginaw", "Richland", "Glenn", "Midland", "Brooklyn"};     bool foundIt = false;  // Flag variable    int x;         // Loop control variable    // Get user input    cout << "Enter name of city: ";    cin >> inCity;        // Write your loop here             // Write your test statement here to see if there is        // a match.  Set the flag to true if city is found.                              // Test to see if city was not found to determine if     // "Not a city in Michigan" message should be printed.…

Chapter 10 Solutions

Starting Out with C++ from Control Structures to Objects (9th Edition)

Ch. 10.5 - Write a short description of each of the following...Ch. 10.5 - Write a statement that will convert the string 10...Ch. 10.5 - Prob. 10.13CPCh. 10.5 - Write a statement that will convert the string...Ch. 10.5 - Write a statement that will convert the integer...Ch. 10.6 - Prob. 10.16CPCh. 10 - Prob. 1RQECh. 10 - Prob. 2RQECh. 10 - Prob. 3RQECh. 10 - Prob. 4RQECh. 10 - Prob. 5RQECh. 10 - Prob. 6RQECh. 10 - Prob. 7RQECh. 10 - Prob. 8RQECh. 10 - Prob. 9RQECh. 10 - Prob. 10RQECh. 10 - The __________ function returns true if the...Ch. 10 - Prob. 12RQECh. 10 - Prob. 13RQECh. 10 - The __________ function returns the lowercase...Ch. 10 - The _________ file must be included in a program...Ch. 10 - Prob. 16RQECh. 10 - Prob. 17RQECh. 10 - Prob. 18RQECh. 10 - Prob. 19RQECh. 10 - Prob. 20RQECh. 10 - Prob. 21RQECh. 10 - Prob. 22RQECh. 10 - Prob. 23RQECh. 10 - Prob. 24RQECh. 10 - The ________ function returns the value of a...Ch. 10 - Prob. 26RQECh. 10 - The following if statement determines whether...Ch. 10 - Assume input is a char array holding a C-string....Ch. 10 - Look at the following array definition: char...Ch. 10 - Prob. 30RQECh. 10 - Write a function that accepts a pointer to a...Ch. 10 - Prob. 32RQECh. 10 - Prob. 33RQECh. 10 - T F If touppers argument is already uppercase, it...Ch. 10 - T F If tolowers argument is already lowercase, it...Ch. 10 - T F The strlen function returns the size of the...Ch. 10 - Prob. 37RQECh. 10 - T F C-string-handling functions accept as...Ch. 10 - T F The strcat function checks to make sure the...Ch. 10 - Prob. 40RQECh. 10 - T F The strcpy function performs no bounds...Ch. 10 - T F There is no difference between 847 and 847.Ch. 10 - Prob. 43RQECh. 10 - char numeric[5]; int x = 123; numeri c = atoi(x);Ch. 10 - char string1[] = "Billy"; char string2[] = " Bob...Ch. 10 - Prob. 46RQECh. 10 - Prob. 1PCCh. 10 - Prob. 2PCCh. 10 - Prob. 3PCCh. 10 - Average Number of Letters Modify the program you...Ch. 10 - Prob. 5PCCh. 10 - Prob. 6PCCh. 10 - Name Arranger Write a program that asks for the...Ch. 10 - Prob. 8PCCh. 10 - Prob. 9PCCh. 10 - Prob. 10PCCh. 10 - Prob. 11PCCh. 10 - Password Verifier Imagine you are developing a...Ch. 10 - Prob. 13PCCh. 10 - Word Separator Write a program that accepts as...Ch. 10 - Character Analysis If you have downloaded this...Ch. 10 - Prob. 16PCCh. 10 - Prob. 17PCCh. 10 - Prob. 18PCCh. 10 - Check Writer Write a program that displays a...

Additional Engineering Textbook Solutions

Find more solutions based on key concepts
What class do you use to write data to a file?

Starting Out with Java: From Control Structures through Objects (6th Edition)

Replace the last loop in Listing 7.8 with a loop that uses the method atLastEntry.

Java: An Introduction to Problem Solving and Programming (7th Edition)

Why were computer programming languages invented?

Starting Out With Visual Basic (7th Edition)

Knowledge Booster
Background pattern image
Computer Science
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning
Text book image
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,
1.1 Arrays in Data Structure | Declaration, Initialization, Memory representation; Author: Jenny's lectures CS/IT NET&JRF;https://www.youtube.com/watch?v=AT14lCXuMKI;License: Standard YouTube License, CC-BY
Definition of Array; Author: Neso Academy;https://www.youtube.com/watch?v=55l-aZ7_F24;License: Standard Youtube License