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
Motor oil is responsible for
Lelechka [254]

Answer:

lubricating all moving parts in the engine

Explanation:

like the pistons, pushrods, and the crank

5 0
3 years ago
I want a real answer to this, not just take my points
faust18 [17]

The reason you dream about him is because you continuously think about him, maybe even before falling asleep.

7 0
3 years ago
A boiler is used to heat steam at a brewery to be used in various applications such as heating water to brew the beer and saniti
Natalija [7]

Answer:

net boiler heat = 301.94 kW

Explanation:

given data

saturated steam = 6.0 bars

temperature = 18°C

flow rate = 115 m³/h = 0.03194 m³/s

heat use by boiler = 90 %

to find out

rate of heat does the boiler output

solution

we can say saturated steam is produce at 6 bar from liquid water 18°C

we know at 6 bar from steam table

hg = 2756 kJ/kg

and

enthalpy of water at 18°C

hf = 75.64 kJ/kg

so heat required for 1 kg is

=hg - hf

= 2680.36 kJ/kg

and

from steam table specific volume of saturated steam at 6 bar is 0.315 m³/kg

so here mass flow rate is

mass flow rate = \frac{0.03194}{0.315}

mass flow rate m = 0.10139 kg/s

so heat required is

H = h × m  

here h is heat required and m is mass flow rate

H = 2680.36  × 0.10139

H =  271.75 kJ/s = 271.75 kW

now 90 % of boiler heat is used for generate saturated stream

so net boiler heat = \frac{H}{0.90}

net boiler heat = \frac{271.75}{0.90}

net boiler heat = 301.94 kW

5 0
3 years ago
Why can't I fly. I dont know why?
algol13
In order to fly, you must have a device/mechanism that will release hot air, causing it to fly. A jet pack will do the job.
5 0
3 years ago
A freezer is maintained at 20°F by removing heat from it at a rate of 75 Btu/min. The power input to the freezer is 0.70 hp, and
Igoryamba

Answer:

Explanation:

Cop of reversible refrigerator = TL / ( TH - TL)

TL = low temperature of freezer = 20 °F

TH = temperature of air around = 75 °F

Heat removal rate QL = 75 Btu/min

W actual, power input = 0.7 hp

conversion on F to kelvin = (T (°F) + 460 ) × 5 / 9

COP ( coefficient of performance) reversible = (20 + 460) × 5/9 / (5/9 ( ( 75 +460) - (20 + 460) ))

COP reversible = 480 / 55 = 8.73

irreversibility expression, I = W actual - W rev

COP r = QL / Wrev

W rev = QL /  COP r  where 75 Btu/min = 1.76856651 hp  where W actual = 0.70 hp

a) W rev =  1.76856651 hp  /  8.73  = 0.20258 hp is reversible power

I = W actual - W rev

b) I = 0.7 hp - 0.20258 hp = 0.4974 hp

c) the second-law efficiency of this freezer = W rev / W actual =  0.20258 hp / 0.7 hp = 0.2894 × 100 = 28.94 %

8 0
3 years ago
Other questions:
  • A 1-lb collar is attached to a spring and slides without friction along a circular rod in a vertical plane. The spring has an un
    6·1 answer
  • Use the convolutional integral to find the response of an LTI system with impulse response ℎ(????) and input x(????). Sketch the
    8·1 answer
  • A frustum of cone is filled with ice cream such that the portion above the cone is a hemisphere. Define the variables di=1.25 in
    9·1 answer
  • The in situ moisture content of a soil is 18% and the moist (total) unit weight is 105 pcf. The soil is to be excavated and tran
    9·1 answer
  • /* Function findBestVacation * duration: number of vacation days * prefs: prefs[k] indicates the rate specified for game k * pla
    14·1 answer
  • An object at a vertical elevation of 20 m and a speed of 5 m/s decreases in elevation to an elevation of 1 m. At this location,
    15·1 answer
  • . (20 pts) A horizontal cylindrical pipe (k = 10 W/m·K) has an outer diameter of 15 cm and a wall thickness of 5 cm. The pipe is
    14·1 answer
  • If you have 300 skittles in a bag and you need to have 28 percent yellow. How many yellow skittles would you have to make a mini
    11·1 answer
  • What is code in Arduino to turn led on and off
    10·1 answer
  • What is included in the environmental impact assessment process, such as the use of geographic information systems?
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!