answer.
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]
2 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]2 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 web 2.0 features allows users to subscribe to a data plan that charges for the amount of time spent on the internet?
galina1969 [7]

Answer:

The answer to this question is given in the explanation section. The correct option is long tail

Explanation:

a.Folksonomy

Folksonomy is a way of organizing data and digital content. With Web 2.0, users can collaboratively manage and tag photos, journals and other media. As more users do this, creates a system of classification for the media and information.  so this option is not correct

b. long tail (correct option)

Some sites are able to offer services as well in which users can subscribe monthly or pay a fee every so often. An example of this would be Netflix.

c.user participation

All users have the free will to contribute to the site which makes many Web 2.0 pages public. With sites such as Wikipedia, anyone is open to the editing of articles. Information is provided two-way instead of solely from the site owner.

d.application

Web 2.0 applications that allow anyone to create and share online information or material they have created. As you know that there are number of different types of web 2.0 applications including wikis, blogs, social networking, folksonomies, podcasting & content hosting services.

3 0
1 year ago
The program DebugTwo2.cs has syntax and/or logical errors. Determine the problem(s) and fix the program.// This program greets t
Elenna [48]

Answer:

The corrected code is as follows:

using System;

using static System.Console;

class DebugTwo2{

     static void Main(string[] args){

       string name;string firstString, secondString;

       int first, second, product;

       Write("Enter your name >> ");

       name = ReadLine();

       Write("Hello, {0}! Enter an integer >> ", name);

       firstString = ReadLine();

       first = Convert.ToInt32(firstString);

       Write("Enter another integer >> ");

       secondString = ReadLine();

       second = Convert.ToInt32(secondString);

       product = first * second;

       Write("Thank you, {0}. The product of {1} and {2} is {3}", name,first, second, product);

   }

}

Explanation:

       string name;string firstString, secondString; ----- Replace secondSting with secondString,

<em>        int first, second, product;</em>

       Write("Enter your name >> "); --- Here, the quotes must be closed with corresponding quotes "

       name = ReadLine(); The syntax of readLine is incorrect without the () brackets

<em>        Write("Hello, {0}! Enter an integer >> ", name);</em>

<em>        firstString = ReadLine();</em>

       first = Convert.ToInt32(firstString); There is a dot between Convert and ToInt32

<em>        Write("Enter another integer >> ");</em>

       secondString = ReadLine(); --- Readline() should be written as ReadLine()

<em>        second = Convert.ToInt32(secondString);</em>

<em>        product = first * second;</em>

       Write("Thank you, {0}. The product of {1} and {2} is {3}", name,first, second, product); --- The formats in {} should start from 0 because 0 has already been initialized for variable name

   }

}

5 0
1 year ago
Jenny has to include the image of a sun on one of her slides. She needs to write relevant text about it on a dark background on
NISA [10]

blank one: light colored

blank two: bold format??

not sure but here is my best guess

8 0
1 year ago
The results of the spec cpu2006 bzip2 benchmark running on an amd barcelona has an instruction count of 2.389e12, an execution t
saw5 [17]

Answer:

CPI = 0.94

Explanation:

The formula for execution time is given below:

Execution time = clock cycles * cycle time

As Execution time = 750 s

clock cycle time = 0.333 ns = 0.333 * 10^-9

so putting these values in the above formula, we get

750 = clock cycles * ( 0.333 * 10^-9 )

clock cycles = 750 / ( 0.333 * 10^-9 )

clock cycles = 2.25 * 10^12

As the results of the spec cpu2006 bzip2 benchmark running on an amd barcelona has an instruction count = 2.389 * 10^12

and the formula for clock cycles is:

clock cycles = number of instructions * CPI

CPI = clock cycles / number of instructions

CPI = 2.25 * 10^12 / 2.389 * 10^12

CPI = 0.94

5 0
1 year ago
You have been employed as a technical consultant to a computer shop chain. You are given the task of creating a short consumer b
brilliants [131]

Answer:

The five factors to consider when trying to choose between a Solid State Drive, a Hard Disk Drive and, an External Hard Disk Drive are:

  1. Read/Write Speed
  2. Weight
  3. Power Consumption
  4. Cost
  5. Storage Capacity

  • Solid State Drives (SSDs) are typically lighter in weight, faster and do not consume much power.
  • Hard Disk Drives are relatively cheaper than SSDs. They also come with higher storage capacities but are more power-hungry and slower because they rely on mechanical/moving parts to read and write data.
  • External HDDs are the cheapest of the three. They are not internal which is a major drawback given the additional weight. However, they come with gargantuan storage capacities that make you want to rethink having one. Besides, unlike SSDs, you can easily get them in computer accessories shops offline or online.

Cheers!

3 0
2 years ago
Other questions:
  • Steps in creating a folder
    12·1 answer
  • Copy the 10 statements as they appear below into your journal.
    6·2 answers
  • Suppose the information content of a packet is the bit pattern 1110 0110 1001 1101 and an even parity scheme is being used. What
    15·1 answer
  • A(n) ____ attack is when a system is compromised and used to attack other systems. a. indirect b. direct c. object d. subject
    13·1 answer
  • The Pentium 4 Prescott processor, released in 2004, had a clock rate of 3.6 GHz and voltage of 1.25 V. Assume that, on average,
    8·1 answer
  • The Web can play a significant role in making large amounts of information available to decision makers. Decision makers must be
    10·1 answer
  • Write a do-while loop that continues to prompt a user to enter a number less than 100, until the entered number is actually less
    10·2 answers
  • Print either "Fruit", "Drink", or "Unknown" (followed by a newline) depending on the value of userItem. Print "Unknown" (followe
    13·1 answer
  • The user interface contains two types of user input controls: TextInput, which accepts all characters and Numeric Input, which a
    11·1 answer
  • Which option in the Caption dialog box configures whether the caption appears above or below the image
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!