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
A user is trying to delete a file located on an ntfs volume on his windows 8 computer but is unable to do so. Why is this.
dezoksy [38]

It happened because the window files on that users pc are corrupted and deleted so the user needs to reinstall the windows and then after he should be able to remove that file from his PC.

If the above thing didn't work, follow the following steps.

- Click the start button ,type in cmd then it will show you a command prompt program icon, right click on that and open it by using the administrator rights. Once the program opened then type in chkdsk /f and hit Enter to automatically scan your computer for any corrupted files/ folders upon the restart of the computer.

This will be definitely helpful for you.

4 0
3 years ago
Who has gotten a random file link from someone? What file does it contain?
Bad White [126]

Answer:

those are bots , just report those

Explanation:

8 0
3 years ago
Read 2 more answers
. Write a function called is_sorted that takes a list as a parameter and returns True if the list is sorted in ascending order a
aalyn [17]

Answer:

There are multiple ways to solve the given problem, I will be presenting the most simple and easy way of solving this problem in few lines of code.

Python code:

def is_sorted(user_list):

   return user_list == sorted(user_list)

user_list=input("Please enter a list: ")

user_list = user_list.split()

print(is_sorted(user_list))

print("Your list: ", user_list)

Explanation:

A function is_sorted is created which takes a list as input and using the sorted() function of python which returns true when the list is sorted in ascending order and returns false when the list is not sorted in ascending order.

Driver code includes getting input list from the user and using split() function to create a list separated by space then printing the output of is_sorted function and in the last printing the contents of that list.

Output:

Please enter a list: 1 3 6 9

True

Your list:  ['1', '3', '6', '9']

Please enter a list: 15 7  2 20

False

Your list:  ['15', '7', '2', '20']

8 0
4 years ago
What is contained in the Open Files section of Shared Folders? ​
amm1812

Answer:

The contents of shared folders might include both programs and data files. Common files may be stored and accessed using shared application folders, which simplify administration and offer a single area for users to store and access common data. If all data files are consolidated in a single shared folder, users will have an easier time finding them.

Explanation:

Hope it helps:)

8 0
2 years ago
Which statement best describes multimedia
d1i1m1o1n [39]

Answer:

I couldn't find options to this question online but I will give you an explanation so you can choose the correct answer.

Explanation:

The term multimedia refers to something that uses multiple media simultaneously when transmitting information.

Examples of this can be:

  • photographs
  • sounds
  • text
  • video

Multimedia frames the objects and systems that use multiple physical or digital media to transmit content. It also refers to the media that store and disseminate these types of content.

6 0
4 years ago
Other questions:
  • When does a kernel panic occur?
    12·2 answers
  • In what ways us cyberspace is real? list at least 3 examples to support your response .
    9·1 answer
  • Among the web programming languages, css is used to define _____ of the web page
    5·1 answer
  • Refer to the exhibit. A web designer calls to report that the web server web-s1.cisco is not reachable through a web browser. Th
    15·1 answer
  • When evaluating portable CD players, you consider price, the sound quality, and ease of using the controls. These are your _____
    8·2 answers
  • Sam needs to create a spreadsheet for his coworkers. They will need to follow a crossed a long road of data. Sam would like to m
    15·1 answer
  • Your sister asks you if it is possible to get an office productivity suite for free. What do you tell her?
    13·1 answer
  • Please help thank you !!!
    7·2 answers
  • In 100 words or less, discuss why ethics is especially important for computer professionals, as it pertains to addressing profes
    5·1 answer
  • What are basic types of touch screen
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!