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
frutty [35]
3 years ago
8

c++ Write a program that reads a list of words. Then, the program outputs those words and their frequencies. The input begins wi

th an integer indicating the number of words that follow. Assume that the list will always contain less than 20 words.
Computers and Technology
1 answer:
Margaret [11]3 years ago
4 0

Answer:

The following are the program in the C++ Programming Language:

#include <iostream> //header file

#include <string>  //header file

#include <vector>  //header file

//name space

using namespace std;

//main function

int main() {

  vector<string> word; //set variable

  vector<int> c;  //set variable

  int s, counts = 0; //set variable

  string strng;  //set variable

  cout<<"Enter the size of string: "; //print message

  cin >> s; //get input

  cout<<"Enter the string: "; //print message

  for(int i = 0; i < s; ++i) {  //set for loop

     cin >> strng; //get input

     word.push_back(strng);

  }

  for(int i = 0; i < s; ++i) { //set for loop

         counts = 0;

         for(int j = 0;j<word.size();j++){ //set for loop

       if(word[j] == word[i]){ //set if statement

          counts++; //increament in counts

       }        

     }

      c.push_back(counts);

  }

  for(int i = 0; i < s; ++i) {

      cout << word[i] << " " << c[i] << endl;//print result

  }

  return 0;

}

<u>Output</u>:

Enter the size of string: 2

Enter the string: hello  sir

hello 1

sir 1

Explanation:

Here, we define three header files <iostream>, <String>, <vector> and namespace "std" after that we define main() method inside it.

  • Then, we set two vector type variables first one is string variable "word" and the second one is integer variable "c".
  • Then we set two integer variable "s" and "counts" and variable "counts" assign to 0.
  • Then, we get input from the user in variable "s" for the length of the loop.
  • Then, we set for the loop inside it, we get input in the variable "strng" from the user.
  • Then, we set the for loop for count the string repetition if any word comes again in the string then the value of count will increase.
  • Finally, we set for a loop to print the result.
You might be interested in
true or false: for most queries, the user location changes our understanding of the query and user intent.
Kipish [7]
The answer is true because I don't know
4 0
3 years ago
A manager would like information on the knowledge base searches conducted by customers and call center agents. Which two metrics
RideAnS [48]

Answer:

Option A and Option D are the correct options.

Explanation:

While any information is provided by the manager to its customers which is based on the knowledge of the search conducted.

So, the following knowledge is about the article of the lowest rating and about the search query that has no output.

  • Option B is not correct for the following scenario because the manager is informing about the searches conducted by customers, not for the data category.
  • Option C is not correct for the following scenario because the articles are not created by them.
3 0
3 years ago
QUESTION 56 Use the Windows ________ to check on a nonresponsive program. Backup utility Error-checking System Restore Task Mana
ASHA 777 [7]

Answer: Task manager

Explanation: The task manager window represents an interface in personal computers manufactures by Microsoft. The task manager window contains several information about a computers current processes usually displayed in graphical manner, in addition it provides information on the current running processes and application, the uptime of the computer, the graphic processor. With the task manager window users can set process priorities and prioritize applications, by affording users to view process and their corresponding load on the CPU, users can terminate or close applications from within the task manager interface. Hence non-responsuve programs can be viewed and terminated.

5 0
3 years ago
What is tnylnk? I keep seeing people leave answers with this.....can someone explain what this is, please...I might give brainie
Naddika [18.5K]

Answer:

ITS A SCAM IT DOWN LOADS NASTY STUFF ON TO UR COMPUTER

Explanation:

hope this helps

8 0
2 years ago
Read 2 more answers
Difference between a software package and Integrated software and why users would choose one over the other
ivolga24 [154]

Answer:

Software Package means software which is used collectively, implements alike purposes, or combines alike characteristics and is bundled collectively being one kit from software applications, where as, Integrated software is a combination of software specifically built to operate on almost linked applications.

Explanation:

Users should choose Software Package because of the following reasons:

  • Cheap price compared over buying individual application independently.
  • Opportunity to introduce the total of the applications at the corresponding period or just that applications you require to work.
  • The compatible user interface of individual application over another.
  • The facility to distribute data among applications.
  • Coming updates can refresh every application whole by the corresponding event.
  • Perfect for individual use, licensed use, huge or little company.
  • Every software holds the full-featured transcription.
5 0
2 years ago
Other questions:
  • Abigail is interested in connecting her tablet that usually connects to a wireless network, to her personal computer that usuall
    11·2 answers
  • Xml is used to format the structure and style of a web page. true or false
    7·1 answer
  • 1. Why is it important to compare features of a computer before making a purchase?
    13·2 answers
  • Angle, oblique, regular, demi, roman, heavy, extra bold, expanded, and compressed are ___________ . Select one: A. type styles B
    10·1 answer
  • Someone help ASAP! Match the type of information system with its description.
    13·2 answers
  • You have been tasked with designing an Ethernet network. Your client needs to implement a very high-speed network backbone betwe
    8·1 answer
  • What is the main feature of chat rooms?
    9·2 answers
  • Shira’s Shoes sold 875,000 pairs of sandals in June, which was 70% of the total number of shoes sold. How many shoes did the com
    14·2 answers
  • Can somebody tell me the Minecraft command to clear an entire world and destroy every block if u Dunno please don’t answer &gt;-
    13·1 answer
  • Design algorithm and the corresponding flow chart for adding the subject score of 5, total value and rank.​
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!