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
Putting commands in correct order so computers can read the commands
lana66690 [7]

Answer:

its b I think I'm pretty sure

8 0
2 years ago
What symbol do we use to denote a character?
pychu [463]

Answer:

'Single Character'

Explanation:

A Character, commonly abbreviated as "char", is a computer symbol, letter, or number. A keyboard is an input device that inputs a character when a key is pressed.

5 0
2 years ago
The ___________________ command is used to establish connectivity.
schepotkina [342]
The PING command is used to establish connectivity
4 0
2 years ago
All of the following are types of data storage devices except CD/DVD computer monitor digital cameras flash drive
horrorfan [7]

Computer Monitors are not storage devices.

3 0
2 years ago
Witch of the following attributes of a website indicates a more reliable source for information
Arada [10]
The only one of those I would trust is the site ending with EDU I hope this helps you.
4 0
3 years ago
Other questions:
  • What branch of science helps avoid or minimize stress-related injuries at workplace?
    6·1 answer
  • What is the difference between chrome and chromium browser?
    9·1 answer
  • In Microsoft Word, how would you change the amount of space that is put in after each paragraph?
    15·1 answer
  • A _____ defines what must take place, not how it will be accomplished.​
    12·1 answer
  • In a car crash, wearing a seat belt __________________.
    5·2 answers
  • Kim is creating a PowerPoint
    13·1 answer
  • Give an idea of a law u would like to create
    5·2 answers
  • SUSSY SUSSY SUSSY SUSSY SUSSY SUSSY SUSSY SUSSY SUSSY SUSSY SUSSY SUSSY SUSSY SUSSY SUSSY SUSSY SUSSY SUSSY SUSSY SUSSY SUSSY SU
    6·2 answers
  • How does microsoft label mac addresses in the windows utilities that show you the mac address?
    13·1 answer
  • Hellpppppppppppppppp
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!