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
What is the primary way to access applications in window 10
Alex787 [66]

Choose Start, type the name of the application, like Word or Excel, in the Search programs and files box. In the search results, click the application to start it. Choose Start > All Programs to see a list of all your applications. You might need to scroll down to see the Microsoft Office group.

8 0
3 years ago
The Fully Meets rating should be assigned when the spelling suggestion matches query intent
neonofarm [45]
Yes definitely absolutely
8 0
3 years ago
Can you shoot video on the Olympus E-410?
Masja [62]
Yes you must update or do something first but then you can
6 0
3 years ago
Read 2 more answers
Please help!! will fan and medal
levacccp [35]
So here are the answers that would best complete the given statements above.
1. <span>The standard resolution for graphics on the Web is 72 dpi.
2. </span> The larger the <span>resolution, the larger the file size.
3. </span>An Inline <span>image is an image that appears on a Web page.
4. File </span><span>size, download times, and the number of colors are factors that will help you decide which graphic format you should use.
5. </span> Adobe Photoshop <span>is an image editing program.
6. The IMG tag </span><span>s used to bring an image into a Web site. 
7. The PNG </span><span>format was the most recently developed popular graphic format. </span>
7 0
3 years ago
Read 2 more answers
A class member function that automatically initializes the data members of a class is called?
____ [38]

A class member function that automatically initializes the data members of a class exists called a constructor.

<h3>What is meant by member function?</h3>

Operators and functions that are designated as members of a class are known as member functions. Operators and functions declared with the friend specifier are not included in member functions. These are referred to as class pals. Together, data members and member functions describe the characteristics and actions of the objects in a Class. Data members are the data variables, and member functions are the functions used to control these variables.

In C++, there are typically five different types of member functions available. Specifically, friend member functions and basic, static, const, inline functions. Classes-only functions are member functions. Any private, protected, or public member of its class may be accessed using the public member function. Any member function of a class, not just the public ones, has access to every single other member that has been declared inside the class. so are easy to programme.

Hence, A class member function that automatically initializes the data members of a class exists called a constructor.

To learn more about member functions refer to:

brainly.com/question/15554910

#SPJ4

3 0
1 year ago
Other questions:
  • 2. Fabulously Fit offers memberships for
    9·1 answer
  • ATM is an abbreviation that stands for Automatic Teller machine?
    5·2 answers
  • What is this I’m so lost
    9·1 answer
  • Which of the following loop conditions will read all the data in the file assuming that each line in the file contains two integ
    5·1 answer
  • Finish the statement below to correctly describe the Defense Enrollment Eligibility Reporting System (DEERS). DEERS is a central
    6·1 answer
  • Write a function all_cats that consumes a comma-separated string of animals and prints whether all of the animals have "cat" in
    12·1 answer
  • Remote wiping is a device security control that allows an organization to remotely erase data or email in the event of loss or t
    10·2 answers
  • Write a program to accept 10 different whole number from the user and store them in a
    11·1 answer
  • Not every organization integrates with the Internet, but all use some or most of the technology that gave rise to it.
    15·1 answer
  • If a friend gave a used Wii disc to someone, and they put it in their Wii, could they play it? Nintendo Switch games can only be
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!