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
dexar [7]
3 years ago
9

A contact list is a place where you can store a specific contact with other associated information such as a phone number, email

address, birthday, etc. Write a program that first takes as input an integer N that represents the number of word pairs in the list to follow.Word pairs consist of a name and a phone number (both strings). That list is followed by a name, and your program should output the phone number associated with that name.
Computers and Technology
1 answer:
NikAS [45]3 years ago
8 0

Answer:

C++.

Explanation:

<em>Code snippet.</em>

#include <map>

#include <iterator>

cin<<N;

cout<<endl;

/////////////////////////////////////////////////

map<string, string> contacts;

string name, number;

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

   cin<<name;

   cin<<number;

   cout<<endl;

   contacts.insert(pair<string, string> (name, number));

}

/////////////////////////////////////////////////////////////////////

map<string, string>::iterator it = contacts.begin();

while (it != contacts.end())  {

   name= it->first;

   number = it->second;

   cout<<word<<" : "<< count<<endl;

   it++;

}

/////////////////////////////////////////////////////////////////////////////////////////////////////////

I have used a C++ data structure or collection called Maps for the solution to the question.

Maps is part of STL in C++. It stores key value pairs as an element. And is perfect for the task at hand.

You might be interested in
In your own opinion how comes the surface grinding machine is called a highly accurate machine tool?​
Luba_88 [7]

Answer: A grinding machine, often shortened to grinder, is one of power tools or machine tools used for grinding. It is a type of machining using an abrasive wheel as the cutting tool. Each grain of abrasive on the wheel's surface cuts a small chip from the workpiece via shear deformation.

6 0
2 years ago
Which type of loop only runs while a condition is true?
Oksanka [162]

Here is some ranting.

You haven't specified programming language. And every type of loop runs only when a condition is true (that is the definition of a loop).

And here is the answer.

Well, there is [code]for[/code], [code]while[/code] and in some languages even [code]do while[/code].

Hope this helps.

3 0
3 years ago
Read 2 more answers
During the boot process, the computer performs a quick self diagnostic then loads the operating system into memory.... IS THIS T
zlopas [31]
<span>The answer is False.  During the boot process, the computer will perform a self-diagnostic, also known as a POST and load necessary drivers and programs that help the computer and devices communicate.</span>
7 0
3 years ago
Java Homework:(The Person, Student, Employee, Faculty, and Staff classes) Design a class named Person and its two subclasses nam
miss Akunina [59]

Answer: Wait, so what is the question exactly..?

8 0
3 years ago
You are researching RAM for a computer you are building for a friend who will be using the system as a home office server for he
belka [17]

Answer:

c) ECC

Explanation:

Based on the usage that the friend will have as well as his concern of the computer crashing due to a memory error, we can say that the best type of RAM that he can purchase is ECC memory. These are regular RAM modules but come with error correcting code. This code checks data as it passes through the RAM and auto corrects it if necessary in order to avoid crashes due to memory error.

I hope this answered your question. If you have any more questions feel free to ask away at Brainly.

5 0
3 years ago
Other questions:
  • Which language is the most popular language for writing apple os x?
    9·1 answer
  • A ____ operating system should be capable of supporting the applications and tools necessary to support Internet operations.
    10·1 answer
  • GUI allows users to communicate with a device and see what they are doing onscreen.
    9·1 answer
  • Numeric data is stored in ___________ for direct processing.
    6·2 answers
  • Select below the Active Directory server role that provides the functions of Active Directory without the requirements of forest
    14·1 answer
  • Where (what memory location) is the data read from for the following code:
    12·1 answer
  • How to change color of object in photoshop?
    10·2 answers
  • Which computer was part of the first generation of computers?
    14·2 answers
  • Given that n refers to a positive int use a while loop to compute the sum of the cubes of the first n counting numbers, and asso
    12·1 answer
  • 4.7 code practice question 2 edhesive i cant figure out the code for this problem csn anyone help me?
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!