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
An uncharged capacitor and a resistor are connected in series to a source of voltage. If the voltage = 7.41 Volts, C = 11.5 µFar
Musya8 [376]

Answer:

a) RC = 1.03 mseg.

b) Qmax = CV = 85.2 μC

c) Q = 53.9 μC

Explanation:

a) In a RC circuit, during the transient period, the capacitor charges exponentially (starting from 0 due to the voltage in the capacitor can´t change instantaneously) with time, being the exponent -t/RC.

This product RC, which defines the rate at which the capacitor charges, is called the time constant of the circuit.

In this case , it can be calculated as follows:

ζ = R C = 89.4 Ω . 11.5 μF = 1.03 mseg.

b) As the charge begins to build up the capacitor plates, a voltage establishes between plates, that opposes to the battery voltage. When this voltage is equal to the battery one, the capacitor reaches to the maximum charge, which is, by definition, as follows:

Q = C V = 11.5 μF . 7.41 V = 85.2 μC

c) During the charging process, the charge increases following this equation:

Q = CV (1 - e⁻t/RC)

When t = RC, the expression for Q is as follows:

Q = CV ( 1- e⁻¹) = 0.63 x CV = 53.9 μC

6 0
4 years ago
When you look at a drawing, how do you know if you are looking at US
Alborosie

Answer:

is it glizzy bread

Explanation:

5 0
3 years ago
A mass weighing 22 lb stretches a spring 4.5 in. The mass is also attached to a damper with Y coefficient . Determine the value
Dominik [7]

Answer:

Cc= 12.7 lb.sec/ft

Explanation:

Given that

m = 22 lb

g= 32 ft/s²

m = \dfrac{22}{32}=0.6875\ s^2/ft

x= 4.5 in

1 in = 0.083 ft

x= 0.375 ft

Spring constant ,K

K=\dfrac{m}{x}=\dfrac{22}{0.375}

K= 58.66  lb/ft

The damper coefficient for critically damped system

C_c=2\sqrt{mK}

C_c=2\sqrt{0.6875\times 58.66}

Cc= 12.7 lb.sec/ft

5 0
3 years ago
primitive transportation and storage systems that make local distribution ineffective if not impossible, the lack of clean water
Vera_Pavlovna [14]

Primitive transportation and storage systems that make local distribution ineffective if not impossible, and the lack of clean water and the lack of effective sewer systems are all examples of the barrier called physical & environmental barriers.

<h3>What are the problems with having physical & environmental barriers?</h3>

Time, Place, Space, Climate, and Noise are the key environmental/physical constraints. Some are simple to change, while others may prove to be difficult.

Physical barriers are essentially defined by three primary factors: environment, distance, and medium unawareness. Environmental barriers, on the other hand, are connected to variables that occur in the current environment.

Learn more about transportation:
brainly.com/question/27667264
#SPJ1

5 0
1 year ago
What careers could you potential do if you
Margarita [4]

Answer:

Engineering careers. If you want to stay in engineering, your job opportunities are very much linked to your degree type, and you probably know what many of them are already. ...

Consulting. ...

Technical writing. ...

Business. ...

Investment banking. ...

Law. ...

Manufacturing and production. ...

Logistics and supply chain.

Explanation:

3 0
3 years ago
Other questions:
  • 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
  • A westbound section of freeway currently has three 12-ft wide lanes, a 6-ft right shoulder, and no ramps within 3 miles upstream
    6·1 answer
  • Select the correct answer.
    8·1 answer
  • A fuel oil is burned with air in a furnace. The combustion produces 813 kW of thermal energy, of which 65% is transferred as hea
    13·1 answer
  • Why does teachers grade things that are not due yet​
    13·2 answers
  • the diagram shows an electrical circuit when the switch is open and closed which series of energy transformation occurs when the
    15·1 answer
  • What is the aim of reviewing a research paper?
    8·2 answers
  • I need help with this assignment. ​
    15·1 answer
  • How can the use of local materials improve the standard of living of Filipinos?
    8·1 answer
  • Drivers education :Anything that draws your mind off driving is
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!