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
2 negative impact of excessive use of computer even in solving mathematical problem.
zlopas [31]

Answer:

Computers are now a days the very important part of each department as well as homes. All people are somehow using computers for their respective needs. As technology always has the negative impacts along with the positive ones so, computer do have some crucial points when taking about students specially.

Following are listed some acts that add to the negativity of computer's usage.

  • Excess use of computers by students while solving mathematical problems lead them to rely totally on the computer. Students don't tend to calculate by their own instead they use computerized calculators for their ease and hence they start lacking even in basic calculations in normal routine also.
  • Computers may impact students routine in such a way that they don't concentrate on their studies while having extreme interest in video games and their favorite seasons and other activities.
  • Using computers more than a certain limit effects eyesight badly. This is the reason today most of the teenagers use spectacles in normal routine.

<h3>I hope it will help you! </h3>
4 0
3 years ago
What is the purpose of a forecast worksheet?
Liono4ka [1.6K]

Answer: It’s a

Explanation:

I got it right on edj

8 0
3 years ago
Software that people commonly use in the workplace to make their lives easier is called
Lorico [155]
Software that people commonly use in the workplace to make their lives easier is called system software.
4 0
3 years ago
What year did polaroid introduce one-step photography with the SX-70
blagie [28]

Answer:

I first saw the Polaroid SX-70—the one-step instant camera introduced in 1972 by the company's co-founder, Dr.

Explanation:

5 0
3 years ago
Given two Strings String s1 = "11223351638791377189728193"; String s2 = "983763978669976862724569282405742578"; and String varia
inn [45]

Answer:

import java.math.BigInteger;  

public class Main {  

public static void main(String[] args)  {  

String s1 = "11223351638791377189728193";   String s2 = "983763978669976862724569282405742578";

BigInteger num1 = new BigInteger(s1);  

BigInteger num2 = new BigInteger(s2);  

BigInteger product = num1.multiply(num2);  

String s3 = product.toString(10);

System.out.println(s3);  

}  

}  

Explanation:

Because s1 and s2 contain large integers, the program need the biginteger module in other to compute the products of s1 and s2 when converted to integers.

This line initializes the two string variables s1 and s2

String s1 = "11223351638791377189728193";   String s2 = "983763978669976862724569282405742578";

The next two lines convert the two strings to BigInteger. This allows the program to multiply large integers

<em> BigInteger a = new BigInteger(s1);   </em>

<em>BigInteger b = new BigInteger(s2);  </em>

<em />

This computes the product of the two big integers

BigInteger product = num1.multiply(num2);  

This converts the product to String s3

String s3 = product.toString(10);

This prints s3

System.out.println(s3);  

}  

}  

7 0
3 years ago
Other questions:
  • 48. What is another word for processor?
    7·1 answer
  • PLEASE HELP! One of the nice byproducts of joining a club, organization, community service project, or service learning project
    6·1 answer
  • When an expression containing a ____ is part of an if statement, the assignment is illegal.
    14·2 answers
  • Which tool allows users to share code and also serves as a social networking
    10·1 answer
  • Consider the following code segment, which is intended to simulate a random process. The code is intended to set the value of th
    13·1 answer
  • 1. Give the binary equivalents for the numbers 15, 24, 102?
    5·1 answer
  • In 1868 the qwerty keyboard was patented by this man
    5·1 answer
  • What is required to publish documents on the Web
    12·1 answer
  • In cell b12 create a formula using max f7nction to calculate maximum value in B4:B9
    7·1 answer
  • Complete the following sentence.
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!