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
erastovalidia [21]
3 years ago
12

Assignment 3: Chatbot

Computers and Technology
1 answer:
Nikolay [14]3 years ago
7 0

Answer:

do you still need the answer? or am i to late lol

Explanation:

You might be interested in
Reverse Word Order: Write a program that reverses the order of the words in a given sentence. This program requires reversing th
Lerok [7]

Answer:

The program in C++ is as follows:

#include <bits/stdc++.h>

using namespace std;

int main(){

string sentence,word="";

getline (cin, sentence);

vector<string> for_reverse;

for (int i = 0; i < sentence.length(); i++){

 if (sentence[i] == ' ')  {

  for_reverse.push_back(word);

  word = "";  }

 else{    word += sentence[i];}  }

for_reverse.push_back(word);

sentence="";

for (int i = for_reverse.size() - 1; i > 0; i--){

 sentence+=for_reverse[i]+" ";}

sentence+=for_reverse[0];

cout<<sentence<<endl;

return 0;

}

Explanation:

This declares sentence and word as strings; word is then initialized to an empty string

string sentence,word="";

This gets input for sentence

getline (cin, sentence);

This creates a string vector to reverse the input sentence

vector<string> for_reverse;

This iterates through the sentence

for (int i = 0; i < sentence.length(); i++){

This pushes each word of the sentence to the vector when space is encountered

<em>  if (sentence[i] == ' ')  { </em>

<em>   for_reverse.push_back(word);</em>

Initialize word to empty string

  word = "";  }

If the encountered character is not a blank space, the character is added to the current word

<em>  else{    word += sentence[i];}  } </em>

This pushes the last word to the vector

for_reverse.push_back(word);  

This initializes sentence to an empty string

sentence="";

This iterates through the vector

for (int i = for_reverse.size() - 1; i > 0; i--){

This generates the reversed sentence

 sentence+=for_reverse[i]+" ";}

This adds the first word to the end of the sentence

sentence+=for_reverse[0];

Print the sentence

cout<<sentence<<endl;

8 0
3 years ago
Supply is a powerful force in a free market.
Greeley [361]

Answer:

Input prices, number of sellers, technology, natural and social factors, and expectations.

Explanation:

Input in prices: When the prices go up supply will fall because lower quantities will be demanded.

Number of sellers: When the number of sellers are more, it will affect sales which is supply.

Technology: This helps in making supply to be properly done. Latest technology such as waybill, email, uber drivers, dispatch via logistics companies, shipment, air cargo carriers and a lot more.

5 0
4 years ago
Read 2 more answers
Use fuel with the _____________ rating recommended by your vehicle manufacturer. A ) Converter B) Emission C) Exhaust D) Octane
Free_Kalibri [48]
I would say the correct answer is "octane". It is important that you use the fuel with  the correct octane rating recommended by the manufacturer. Among the choices it is only octane that is used as a rating for fuels. Hope this helps.
7 0
3 years ago
Read 2 more answers
Access data is _______ in a Word document.
Naya [18.7K]
I believe the answer is embedded. but make sure to check multiple sources.
5 0
3 years ago
When you add text to a slide using presentation software, which of the following is important?
katrin [286]
I think the answer is B. The text should be brief. 
7 0
4 years ago
Read 2 more answers
Other questions:
  • On the Internet, you can use a(n)______to look for information on any topic, such as books, movies, scholarly articles, news, an
    6·2 answers
  • What will the following loop display? 0 1 2 3 4 5 0 1 2 3 4 0 1 2 3 4 The loop will display numbers starting at 0, for infinity.
    8·1 answer
  • Crack the secret message: Crrp, Crrp, Crrp Zh’uh jrlqj wr wkh prrq. Li brx zdqw wr wdnh d wuls, Folpe derdug pb urfnhw vkls. (hi
    7·1 answer
  • Compare GBN, SR, and TCP (no delayed ACK). Assume that the timeout values for all three protocols are sufficiently long such tha
    11·1 answer
  • Which scenario could be represented by the given graph?
    14·1 answer
  • During his last performance review, Franco's boss urged him to set some short-term and long-term sales goals to help him perform
    6·2 answers
  • Consider a hypothetical hard drive that has 400,000 cylinders, 8 heads, and 128 sectors per track. Demonstrate, in writing, how
    9·1 answer
  • Which are three possible text formatting actions in wordpad?
    6·1 answer
  • Which statement best describes the refraction of light
    9·1 answer
  • 4. Use the information under the Nutrients That the Human Body Needs title to create a multilevel list. Your list should meet th
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!