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
Describe the greatest power in design according to Aravena?
KiRa [710]

The greatest power in design according to Aravena is "the power of synthesis”.

Hope that helps!

8 0
2 years ago
Air is compressed by a 30-kW compressor from P1 to P2. The air temperature is maintained constant at 25°C during this process as
adell [148]

Answer:

-0.1006Kw/K

Explanation:

The rate of entropy change in the air can be reduced from the heat transfer and the air temperature. Hence,

ΔS = Q/T

Where T is the constant absolute temperature of the system and Q is the heat transfer for the internally reversible process.

S(air) = - Q/T(air) .......1

Where S.air =

Q = 30-kW

T.air = 298k

Substitute the values into equation 1

S(air) = - 30/298

= -0.1006Kw/K

4 0
2 years ago
What is an example of a traditional career?
vladimir2022 [97]

Answer:

C, Teacher

Explanation:

7 0
2 years ago
Read 2 more answers
Assume the following LTI system where the input signal is an impulse train (i.e.,x(t)=∑????(t−nT0)[infinity]n=−[infinity].a)Find
Igoryamba

Answer:

See explaination

Explanation:

The Fourier transform of y(t) = x(t - to) is Y(w) = e- jwto X(w) . Therefore the magnitude spectrum of y(t) is given by

|Y(w)| = |X(w)|

The phase spectrum of y(t) is given by

<Y(w) = -wto + <X(w)

please kindly see attachment for the step by step solution of the given problem.

4 0
3 years ago
Conclusion. What process is responsible for the bubbling action of the organism? What is your evidence?
noname [10]

Answer:

Explanation:

Hands-on Activity Bubbling Plants Experiment to Quantify Photosynthesis ... After running the experiment, students pool their data to get a large sample ... Explain that photosynthesis is a process that plants use to convert light ... Describe a simple experiment that provides indirect evidence that photosynthesis is occurring.

Through photosynthesis, certain organisms convert solar energy (sunlight) into ... of our planet continuously and is transferred from one organism to another. Therefore, directly or indirectly, the process of photosynthesis provides most of the energy ... Biology in Action ... Chlorophyll is responsible for the green color of plants.Photosynthetic organisms capture energy from the sun and matter from the air to ... oxygen produced during photosynthesis makes leaf bits float like bubbles in water. ... their ability to carry out photosynthesis, the biochemical process of capturing ... this air is forced out and replaced with solution, causing the leaves to sink.

6 0
2 years ago
Other questions:
  • 1000 lb boulder B is resting on a 500 lb platform A when truck C accidentally accelerates to the right (truck in reverse). Which
    15·1 answer
  • Tranquilizing drugs that inhibit sympathetic nervous system activity often effectively reduce people's subjective experience of
    8·1 answer
  • The flow curve for a certain metal has parameters: strain-hardening
    8·1 answer
  • You are using a Geiger counter to measure the activity of a radioactive substance over the course of several minutes. If the rea
    6·1 answer
  • How do i play Fortnite on controller?
    6·2 answers
  • Principals of Construction intro
    11·1 answer
  • Steam enters a heavily insulated throttling valve at 11 MPa, 600°C and exits at 5.5 MPa. Determine the final temperature of the
    14·1 answer
  • What are the BENEFITS and RISKS of using automobiles?
    10·1 answer
  • I NEED HELP!!!Situation: A client has hired Jose, a materials engineer, to develop a package for an item he has begun to market.
    15·1 answer
  • The centre of the circumstancribing circle of a triangle can be found by using the
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!