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
Two-pronged plugs are designed for home use
sergiy2304 [10]

Answer: yes i am sure that a two-pronged plugs are made for houses for the lower volts of electric power unlike a three-pronged plug allows more electric to be used

Explanation: :)

5 0
3 years ago
Read 2 more answers
Air modeled as an ideal gas enters a well-insulated diffuser operating at steady state at 270 K with a velocity of 180 m/s and e
ZanzabumX [31]

Answer:

exit temperature 285 K

Explanation:

given data

temperature T1 = 270 K

velocity = 180 m/s

exit velocity =  48.4 m/s

solution

we know here diffuser is insulated so here heat energy is negleted

so we write here energy balance equation that is

0 = m (h1-h2) + m ×  (\frac{v1^2}{2}-\frac{v2^2}{2})   .....................1

so it will be

h1 + \frac{v1^2}{2} = h2 + \frac{v2^2}{2}      .....................2

put here value by using ideal gas table

and here for temperature 270K

h1 = 270.11 kJ/kg

270.11 + \frac{180^2\times \frac{1}{1000}}{2} = h2 + \frac{48.4^2\times \frac{1}{1000}}{2}  

solve it we get

h2 = 285.14 kJ/kg

so by the ideal gas table we get

T2 = 285 K

4 0
3 years ago
Several different loads are going to be used with the voltage divider from Part A. If the load resistances are 300 kΩkΩ , 200 kΩ
harina [27]

Answer:

attached below

Explanation:

7 0
4 years ago
How many paragraphs are good for an essay
zhannawk [14.2K]

Answer:

It depends what type of essay you're writing. Normally you'll want an intro, three body paragraphs and then a conclusion, but if you're writing an argumentative essay you will want an intro par, three body par, a counterclaim and rebuttal par, and a conclusion par.

Explanation:

Typically 5 or 6 paragraphs will work, really just depends what type of essay.

3 0
3 years ago
Read 2 more answers
How to calculate tension.
Evgen [1.6K]

Answer:

Tension can be easily explained in the case of bodies hung from chain, cable, string

Explanation

uniform speed, tension; T = W.

T=m(g±a)

3 0
3 years ago
Other questions:
  • Why do we study economics
    13·1 answer
  • 9) A construction company employs 2 sales engineers. Engineer 1 does the work in estimating cost for 70% of jobs bid by the comp
    11·1 answer
  • A thermal energy storage unit consists of a large rectangular channel, which is well insulated on its outer surface and encloses
    7·1 answer
  • Assuming the point estimate in Problem 6.36 is the true population parameter, what is the probability that a particular assay, w
    15·1 answer
  • A room is cooled by circulating chilled water through a heat exchanger located in the room. The air is circulated through the he
    15·1 answer
  • 2. The soil borrow material to be used to construct a highway embankment has a mass unit weight of 110.0 pcf, a water content of
    11·1 answer
  • A transformer is to be used to provide power for a computer disk drive that needs 6.4 V (rms) instead of the 120 V (rms) from th
    10·1 answer
  • Problematic substances mechanical engeneering???
    6·1 answer
  • Which apparatus is likely to carry a ladder? (There may be more than one answer.)
    8·1 answer
  • Hia how yall doin, someone somehow revived me thro a screen--
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!