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
Consider two Carnot heat engines operating in series. The first engine receives heat from the reservoir at 1400 K and rejects th
Aleksandr-060686 [28]

Answer:

The temperature T= 648.07k

Explanation:

T1=input temperature of the first heat engine =1400k

T=output temperature of the first heat engine and input temperature of the second heat engine= unknown

T3=output temperature of the second heat engine=300k

but carnot efficiency of heat engine =1 - \frac{Tl}{Th} \\

where Th =temperature at which the heat enters the engine

Tl is the  temperature of the environment

since both engines have the same thermal capacities <em>n_{th} </em> therefore n_{th} =n_{th1} =n_{th2}\\n_{th }=1-\frac{T1}{T}=1-\frac{T}{T3}\\ \\= 1-\frac{1400}{T}=1-\frac{T}{300}\\

We have now that

\frac{-1400}{T}+\frac{T}{300}=0\\

multiplying through by T

-1400 + \frac{T^{2} }{300}=0\\

multiplying through by 300

-420000+ T^{2} =0\\T^2 =420000\\\sqrt{T2}=\sqrt{420000}  \\T=648.07k

The temperature T= 648.07k

5 0
3 years ago
For some metal alloy, a true stress of 345 MPa (50040 psi) produces a plastic true strain of 0.02. How much will a specimen of t
saveliy_v [14]

Complete Question

For some metal alloy, a true stress of 345 MPa (50040 psi) produces a plastic true strain of 0.02. How much will a specimen of this material elongate when a true stress of 411 MPa (59610 psi) is applied if the original length is 470 mm (18.50 in.)?Assume a value of 0.22 for the strain-hardening exponent, n.

Answer:

The elongation is =21.29mm

Explanation:

In order to gain a good understanding of this solution let define some terms

True Stress

       A true stress can be defined as the quotient obtained when instantaneous applied load is divided by instantaneous cross-sectional area of a material it can be denoted as \sigma_T.

True Strain

     A true strain can be defined as the value obtained when the natural logarithm quotient of instantaneous gauge length divided by original gauge length of a material is being bend out of shape by a uni-axial force. it can be denoted as \epsilon_T.

The mathematical relation between stress to strain on the plastic region of deformation is

              \sigma _T =K\epsilon^n_T

Where K is a constant

          n is known as the strain hardening exponent

           This constant K can be obtained as follows

                        K = \frac{\sigma_T}{(\epsilon_T)^n}

No substituting  345MPa \ for  \ \sigma_T, \ 0.02 \ for \ \epsilon_T , \ and  \ 0.22 \ for  \ n from the question we have

                     K = \frac{345}{(0.02)^{0.22}}

                          = 815.82MPa

Making \epsilon_T the subject from the equation above

              \epsilon_T = (\frac{\sigma_T}{K} )^{\frac{1}{n} }

Substituting \ 411MPa \ for \ \sigma_T \ 815.82MPa \ for \ K  \ and  \  0.22 \ for \ n

       \epsilon_T = (\frac{411MPa}{815.82MPa} )^{\frac{1}{0.22} }

            =0.0443

       

From the definition we mentioned instantaneous length and this can be  obtained mathematically as follows

           l_i = l_o e^{\epsilon_T}

Where

       l_i is the instantaneous length

      l_o is the original length

Substituting  \ 470mm \ for \ l_o \ and \ 0.0443 \ for  \ \epsilon_T

             l_i = 470 * e^{0.0443}

                =491.28mm

We can also obtain the elongated length mathematically as follows

            Elongated \ Length =l_i - l_o

Substituting \ 470mm \ for l_o and \ 491.28 \ for \ l_i

          Elongated \ Length = 491.28 - 470

                                       =21.29mm

4 0
3 years ago
Fill in the blank to correctly complete the statement below.
ZanzabumX [31]
Did not engineer cables factoring wind shear
4 0
3 years ago
What is Maglev Technology?<br> I don't want a copied and pasted answer please.
Levart [38]

Answer:

I do not know much but I looked and read, this I learned I hope this is good

The Maglev is a system of train transportation that uses two sets of magnets

working repel one another when matching poles face each other. Here, both magnetic attraction and repulsion are used to move the train car along the guideway.

Explanation:

Brainliest please

5 0
2 years ago
Block A hangs by a cord from spring balance D and is submerged in a liquid C contained in beaker B. The mass of the beaker is 1.
nikitadnepr [17]

Answer:

a)  m_e= 3.05 Kg

b)  \rho=1072.3kg/m^3

c)  m_e= 3.05 Kg

Explanation:

From the question we are told that:

Beaker Mass m_b=1.20

Liquid Mass m_l=1.85

Balance D:

Mass m_d=3.10

Balance E:

Mass m_e=7.50

Volume v=4.15*10^{-3}m^3

a)

Generally the equation for Liquid's density is mathematically given by

m_e=m_b+m_l+(\rho*v)

\rho=\frac{7.50-(1.2+1.85)}{4.15*10^{-3}}

\rho=1072.3kg/m^3

b)

Generally the equation for D's Reading at A pulled is mathematically given by

m_d = mass of block - mass of liquid displaced

m_d=m- (\rho *v )

m=3.10+ (1072.30 *4.15*10^{-3}m^3 )

m=18.10kg

c)

Generally the equation for E's Reading at A pulled is mathematically given by

m_e=m_b+m_l

m_e = 1.20 + 1.85

m_e= 3.05 Kg

6 0
3 years ago
Other questions:
  • Explain the differences between 1- Energy 2- Power 3- Work 4- Heat Your answer should explain the mathematica and physical meani
    5·1 answer
  • Steam flows at steady state through a converging, insulated nozzle, 25 cm long and with an inlet diameter of 5 cm. At the nozzle
    11·1 answer
  • Air enters a compressor operating at steady state with pressure of 90 kPa, at a temperature of 350 K, and a volumetric flow rate
    13·1 answer
  • Suppose an underground storage tank has been leaking for many years, contaminating a groundwater and causing a contaminant conce
    8·1 answer
  • Which traditional subject is part of construction management or construction science syllabi?
    5·1 answer
  • Refrigerant 134a enters a horizontal pipe operating at steady state at 40°C, 300 kPa, and a velocity of 25 m/s. At the exit, the
    11·1 answer
  • 11. Technicians A and B are discussing
    12·1 answer
  • Any help is appreciated &lt;3
    14·1 answer
  • Which outcome most accurately portrays the future for the timber company in the following scenario?
    9·1 answer
  • What’s the answer to this I don’t understand
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!