1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Naya [18.7K]
3 years ago
11

In part A you are asked to write the pseudocode for the program. In part B you are asked to write the syntax of the code for the

program you outlined in the pseudocode.
Program requirements:
(a) Accepts the user response to the prompt "What is your favorite quote from a book?"
(b) Accepts the user repsonse to the prompt "What book was that quote from?"
(c) Accepts the user reponse to the prompt "What page was that quote from?"
(d) Count the number of upper case letters
(e) Count the total number of characters
(f) Dispaly "This includes 'dog' in the quote" if the quote includes the three characters to form the series of characters 'dog' any place in the quote.
(g) Use a loop
(h) Print the total number of characters
Engineering
1 answer:
Naya [18.7K]3 years ago
3 0

Answer:

C++.

Explanation:

#include <iostream>

#include <string>

using namespace std;

///////////////////////////////////////////////////////////////

int main() {

   string quote, book;

   int page;

   

   cout<<"What is your favorite quote from a book?"<<endl;

   getline(cin, quote);

   cout<<endl;

   /////////////////////////////////////////////

   cout<<"What book was that quote from?"<<endl;

   getline(cin, book);

   cout<<endl;

   /////////////////////////////////////////////

   cout<<"What page was that quote from?"<<endl;

   cin>>page;

   cout<<endl;

   /////////////////////////////////////////////

   int no_of_upper_characters = 0;

   for (int i=0; i<quote.length(); i++) {

       if (isupper(quote[i]))

          no_of_upper_characters++;

   }

   

   cout<<"No. of upper case characters: "<<no_of_upper_characters<<endl;

   /////////////////////////////////////////////

   int no_of_characters = quote.length();

   cout<<"No. of characters: "<<no_of_characters<<endl;

   /////////////////////////////////////////////

   bool isDog = false;

   for (int i=0; i<quote.length(); i++) {

       if (isDog == true)

           break;

       else if (quote[i] == 'd') {

           for (int j=i+1; j<quote.length(); j++) {

               if (isDog == true)

                   break;

               else if (quote[j] == 'o') {

                   for (int z=j+1; z<quote.length(); z++) {

                       if (quote[z] == 'g') {

                           isDog = true;

                           break;

                       }

                   }

               }

           }

       }

   }

   

   if (isDog == true)

       cout<<"This includes 'd' 'o' 'g' in the quote";

   //////////////////////////////////////////////

   return 0;

}

You might be interested in
Choose the three questions that an engineer should ask himself or herself when identifying the need of a problem.
boyakko [2]

Answer:

What is the goal? What will a successful solution look like? What is it that the client expects me to accomplish?

Explanation:

5 0
2 years ago
Read 2 more answers
Calculate the density of the FCC nickel lattice with an interstitial hydrogen in the centered position of the unit cell. You may
Anastaziya [24]

Answer:

\rho=8907.94\ Kg/m^3

Explanation:

Given that

a=3.524 A

At.Wt. ,M= 58.7 g/mole,

 For FCC

 Z = 4

4r=\sqrt2\ a

The density given as

\rho=\dfrac{ZM}{N_Aa^3}

\rho=\dfrac{4\times 58.7\times 10^{-3} }{ 6.023\times 10^{23}\times (3.524\times 10^{-10})^3}

\rho=8907.94\ Kg/m^3

So the density is \rho=8907.94\ Kg/m^3

4 0
3 years ago
Based on the pattern, what are the next two terms of the sequence? 9,94,916,964,9256,... A. 91024,94096 B. 9260,91028 C. 9260,92
Hatshy [7]

Answer:

The answer is "Option A".

Explanation:

Series:

9, 94, 916, 964, 9256, ........

Solving the above series:

\to  9\\ \to  9(4) =94\\\to 9 (4^2) = 9(16) =916\\\to 9 (4^3) = 9(64) =964\\\to 9 (4^4) = 9(256) =9256\\\to 9 (4^5) = 9(1024) =91024\\\to 9 (4^6) = 9(4096) =94096\\

So, the series is:  9, 94, 916, 964, 9256, 91024, 94096, .................

6 0
3 years ago
Precast concrete curtain wall panels: Group of answer choices are typically manufactured on site and then hoisted into place. of
amid [387]

Answer:

c) can be made with a variety of surface finishes.

Explanation:

The missing options are;

When it comes to concrete work in construction, the concrete can be cast either in-situ or in form of pre-cast concrete.

Now in-situ concrete means concrete done on the construction site being built while pre cast concrete simply means concrete cast outside in a factory or yard and brought to site to mount.

These pre cast concrete could have different surface finishes as required as this is one of it's advantages over in situ because there is a lot of space and room to have the desired concrete finish.

a) are typically manufactured on site and then hoisted into place.

b) cannot be fiber-reinforced.

c) can be made with a variety of surface finishes.

d) never include insulation.

e) often are unreinforced.

5 0
2 years ago
What did August Comte contribute to sociology including positivism
Travka [436]

Answer:

Auguste Comte was the first to develop the concept of "sociology." He defined sociology as a positive science. Positivism is the search for "invariant laws of the natural and social world." Comte identified three basic methods for discovering these invariant laws, observation, experimentation, and comparison.

Explanation:

I hope it's help u :)

4 0
3 years ago
Other questions:
  • What is productivity as it relates to labor?
    11·1 answer
  • Stainless steel ball bearings (rho = 8085 kg/m3 and cp = 0.480 kJ/kg·°C) having a diameter of 1.2 cm are to be quenched in water
    10·2 answers
  • Atmospheric pressure is measured to be 14.769 psia. a. What would be the equivalent reading of a water barometer (inches of H20)
    11·1 answer
  • Practice Problem: True Stress and Strain A cylindrical specimen of a metal alloy 49.9 mm long and 9.72 mm in diameter is stresse
    13·1 answer
  • A wall in a house contains a single window. The window consists of a single pane of glass whose area is 0.15 m2 and whose thickn
    10·1 answer
  • This is a multi-part question. Once an answer is submitted, you will be unable to return to this part As steam is slowly injecte
    15·1 answer
  • The ultimate BOD of a river just below a sewage outfall is 50.0 mg/L, and the oxygen deficit at the outfall D0 is 2.0 mg/L. The
    6·1 answer
  • Who is using welding symbols to to communicate the detailed information necessary for welders to complete the weld?
    6·1 answer
  • A railroad runs form city A to city B, a distance of 800km, through mountainous terrain. The present one-way travel time (includ
    13·1 answer
  • The sum of forces on node 2 (upper-left) is ______.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!