Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I can't seem to get this code to work: #include #include #include #include using namespace std; /** * Auto-generated code below aims at helping you

I can't seem to get this code to work:

#include

#include

#include

#include

using namespace std;

/**

* Auto-generated code below aims at helping you parse

* the standard input according to the problem statement.

**/

int main()

{

int N; // Number of elements which make up the association table.

cin >> N; cin.ignore();

int Q; // Number Q of file names to be analyzed.

cin >> Q; cin.ignore();

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

string EXT; // file extension

string MT; // MIME type.

cin >> EXT >> MT; cin.ignore();

}

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

string FNAME;

getline(cin, FNAME); // One file name per line.

}

// Write an answer using cout. DON'T FORGET THE "<< endl"

// To debug: cerr << "Debug messages..." << endl;

cerr << "Debug messages..." << endl;

cout << "image/gif" << endl;

// For each of the Q filenames, display on a line the corresponding MIME type. If there is no corresponding type, then display UNKNOWN.

cout << "UNKNOWN" << end;

}

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Financial management theory and practice

Authors: Eugene F. Brigham and Michael C. Ehrhardt

12th Edition

978-0030243998, 30243998, 324422695, 978-0324422696

Students also viewed these Programming questions

Question

=+ Strengths and weaknesses of LIME, SHAP, and anchors

Answered: 1 week ago