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
Stella [2.4K]
3 years ago
14

C++

Computers and Technology
1 answer:
vichka [17]3 years ago
4 0

Answer:

#include <iostream>

#include <map>  

using namespace std;

int main()

{

   map<int, int> numbers;

   cout << "Enter numbers, 0 to finish" << endl;

   int number;

   while (true) {

       cin >> number;

       if (number == 0) break;

       numbers[number]++;

   }

   for (pair<int, int> element : numbers) {

       std::cout << element.first << ": occurs " << element.second << " times" << std::endl;

   }

}

Explanation:

One trick used here is not to keep track of the numbers themselves (since that is not a requirement), but start counting their occurrances right away. An STL map< > is a more suitable construct than a vector< >.

You might be interested in
What is a benefit of starting a new business from scratch?
skad [1K]

Answer:

You can do what you want

Explanation:

The sky is the limit

3 0
3 years ago
I need help here thanks forever who helps
lubasha [3.4K]

Answer:

the horse, the man, and the cactus

Explanation:

The horse is running

The man got slung off the horse, so its in motion

The cactus is flying everywhere from the horse.

3 0
2 years ago
Mrs. Jackson wrote a newsletter to the customers of her housecleaning business that included some organizational tips they could
nika2105 [10]
The correct answer is a. effective communication

- - -
Ineffective and barriers to communication are problems that make communication unclear. Workplace communication is at work or at a job. This is not a job newsletter for workers, but for people at home.
5 0
3 years ago
Read 2 more answers
Considering current online newspaper editions and the characteristics of digital age media, how do you think newspaper design mi
NeX [460]
One way that a newspaper design may change in the future is that they will only be available in an interactive online edition. The correct answer is B. <span />
6 0
3 years ago
What is an example of a reputable website
Keith_Richards [23]
A reputable website would be one that you could research online and read about it's history , reviews etc .
4 0
3 years ago
Read 2 more answers
Other questions:
  • What two images did you have to add to the wds server to handle the windows installation?
    7·1 answer
  • A dropped packet is often referred to as a _____________.
    7·1 answer
  • Devices designed primarily to be used with a company network are called
    12·1 answer
  • what type of authentication does the dod require to accesss sensitive data on mobile devices and /or email
    7·2 answers
  • A(n) ____ is a collection of one or more program statements combined to perform some action
    14·1 answer
  • When a range of IP addresses is set aside for client devices, and one of these IPs is issued to these devices when they request
    14·1 answer
  • 5.
    6·1 answer
  • A ____ typically rests on the desk or other flat surface close to the user’s computer, and it is moved across the surface with
    13·1 answer
  • Jim is in the market for a car that will last for the next 10 years and has saved up some money for the purpose of a car. What’s
    8·2 answers
  • WILL GIVE BRAINLIEST!! NO LINKS!!!
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!