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
serg [7]
2 years ago
12

Explain what a datalist element does and is used for.

Computers and Technology
1 answer:
lora16 [44]2 years ago
8 0
The datalist element is specifically a set of pre-defined options for an input element. It could be used to provide fast choices for an input field such as an "autocomplete" feature.
You might be interested in
Write a program that lets the user enter the total rainfall for each of 12 months into a vector of doubles. The program will als
madam [21]

Answer:

Explanation:

#include<iostream>

#include<iomanip>

#include<vector>

using namespace std;

double getAverage(const vector<double> amounts)

{

   double sum = 0.0;

   for (int i = 0; i < amounts.size(); i++)

       sum += amounts[i];

   return(sum / (double)amounts.size());

}

int getMinimum(const vector<double> amounts)

{

   double min = amounts[0];

   int minIndex = 0;

   for (int i = 0; i < amounts.size(); i++)

   {

       if (amounts[i] < min)

       {

           min = amounts[i];

           minIndex = i;

       }

   }

   return minIndex;

}

int getMaximum(const vector<double> amounts)

{

   double max = amounts[0];

   int maxIndex = 0;

   for (int i = 0; i < amounts.size(); i++)

   {

       if (amounts[i] > max)

       {

           max = amounts[i];

           maxIndex = i;

       }

   }

   return maxIndex;

}

int main()

{

   vector<string> months;

   vector<double> rainfalls;

   months.push_back("January");

   months.push_back("February");

   months.push_back("March");

   months.push_back("April");

   months.push_back("May");

   months.push_back("June");

   months.push_back("July");

   months.push_back("August");

   months.push_back("September");

   months.push_back("October");

   months.push_back("November");

   months.push_back("December");

   cout << "Input 12 rainfall amounts for each month:\n";

   for (int i = 0; i < 12; i++)

   {

       double amt;

       cin >> amt;

       rainfalls.push_back(amt);

   }

   cout << "\nMONTHLY RAINFALL AMOUNTS\n";

   cout << setprecision(2) << fixed << showpoint;

   for (int i = 0; i < 12; i++)

       cout << left << setw(11) << months[i] << right << setw(5) << rainfalls[i] << endl;

   cout << "\nAVERAGE RAINFALL FOR THE YEAR\n" << "Average: " << getAverage(rainfalls) << endl;

   int minIndex = getMinimum(rainfalls);

   int maxIndex = getMaximum(rainfalls);

   cout << "\nMONTH AND AMOUNT FOR MINIMUM RAINFALL FOR THE YEAR\n";

   cout << months[minIndex] << " " << rainfalls[minIndex] << endl;

   cout << "\nMONTH AND AMOUNT FOR MAXIMUM RAINFALL FOR THE YEAR\n";

   cout << months[maxIndex] << " " << rainfalls[maxIndex] << endl;

   return 0;

}

3 0
2 years ago
Please anwer it ..........<br>if you know
NeTakaya

Answer:

a) Email

b) VolP

b) OzoBot

Explanation:

<h3>#hope</h3>
7 0
2 years ago
Read 2 more answers
Why does the use of passwords put the overall security of the network in jeopardy?
mash [69]
There is only so many amounts of passwords that can be used so they can repeat and people can learn they are the same and hack youuu
5 0
1 year ago
The process that converts program code into machine language is called
Elena L [17]

Answer:

"Compilation" is the correct answer.

Explanation:

4 0
3 years ago
Declare and implement a function called gameOver.gameOver receives a single 3x3 char[] [] array as a parameter, representing a t
svlad2 [7]

Answer:

The function in C++ is as follows:

char gameOver(char arr[][3]){

   char winner = ' ';

   if((arr[0][0] == 'X' && arr[0][1] == 'X' && arr[0][2] == 'X') ||(arr[1][0] == 'X' && arr[1][1] == 'X' && arr[1][2] == 'X') || (arr[2][0] == 'X' && arr[2][1] == 'X' && arr[2][2] == 'X')||(arr[0][0] == 'X' && arr[1][0] == 'X' && arr[2][0] == 'X') ||(arr[0][1] == 'X' && arr[1][1] == 'X' && arr[2][1] == 'X') || (arr[0][2] == 'X' && arr[1][2] == 'X' && arr[2][2] == 'X')){

       winner = 'X';

   }

   else if((arr[0][0] == 'O' && arr[0][1] == 'O' && arr[0][2] == 'O') ||(arr[1][0] == 'O' && arr[1][1] == 'O' && arr[1][2] == 'O') || (arr[2][0] == 'O' && arr[2][1] == 'O' && arr[2][2] == 'O')||(arr[0][0] == 'O' && arr[1][0] == 'O' && arr[2][0] == 'O') ||(arr[0][1] == 'O' && arr[1][1] == 'O' && arr[2][1] == 'O') || (arr[0][2] == 'O' && arr[1][2] == 'O' && arr[2][2] == 'O')){

       winner = 'O';

   }

   return winner;

}

Explanation:

The function checks for the winning character by checking for matching rows and matching columns.

When either X or O fall in the any of the following 6 conditions , then that character (X or O) wins.

The position are:

Rows: (1) 00, 01 and 02 (2) 10, 11 and 12 (3) 20, 21 and 22

Columns: (4) 00, 10 and 20 (5) 01, 11 and 21 (6) 02, 12 and 22

So, the explanation is:

This defines the function gameOver

char gameOver(char arr[][3]){

This initializes winner to blank space

   char winner = ' ';

If any of the condition stated above matches X, then X wins

<em>    if((arr[0][0] == 'X' && arr[0][1] == 'X' && arr[0][2] == 'X') ||(arr[1][0] == 'X' && arr[1][1] == 'X' && arr[1][2] == 'X') || (arr[2][0] == 'X' && arr[2][1] == 'X' && arr[2][2] == 'X')||(arr[0][0] == 'X' && arr[1][0] == 'X' && arr[2][0] == 'X') ||(arr[0][1] == 'X' && arr[1][1] == 'X' && arr[2][1] == 'X') || (arr[0][2] == 'X' && arr[1][2] == 'X' && arr[2][2] == 'X')){</em>

<em>        winner = 'X';</em>

<em>    }</em>

If otherwise that it matches O, then O wins

<em>    else if((arr[0][0] == 'O' && arr[0][1] == 'O' && arr[0][2] == 'O') ||(arr[1][0] == 'O' && arr[1][1] == 'O' && arr[1][2] == 'O') || (arr[2][0] == 'O' && arr[2][1] == 'O' && arr[2][2] == 'O')||(arr[0][0] == 'O' && arr[1][0] == 'O' && arr[2][0] == 'O') ||(arr[0][1] == 'O' && arr[1][1] == 'O' && arr[2][1] == 'O') || (arr[0][2] == 'O' && arr[1][2] == 'O' && arr[2][2] == 'O')){</em>

<em>        winner = 'O';</em>

<em>    }</em>

This returns the winner (either O, X or blank)

   return winner;

<em>See attachment for complete program which includes the main</em>

Download cpp
7 0
3 years ago
Other questions:
  • In Linux Operating System, what file extension is used forexecutable files?
    6·1 answer
  • High-speed memory that reduces the frequency of access by the cpu to conventional memory is called
    12·1 answer
  • Where can you find gradpoint answers
    13·2 answers
  • Write a function to sum the following series:
    8·1 answer
  • Addition and subtraction are considered to be ____ operations performed by a computer.
    7·1 answer
  • Which type of business is best for Juanita to start? a corporation, because she needs a large investment to get started a sole p
    13·2 answers
  • PLEASE ANSWER THIS IM IN A QUIZ
    15·2 answers
  • The help desk received a call from a user who cannot get any print jobs to print on the locally shared printer. While questionin
    8·1 answer
  • How bout these chose your fave for bnha
    14·2 answers
  • Which location on the ribbon contains the commands for adding a table to a document?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!