subject

HTTP is the protocol that governs communications between web servers and web clients (i. e. browsers). Part of the protocol includes a status code returned by the server to tell the browser the status of its most recent page request. Some of the codes and their meanings are listed below: C++ 200, OK (fulfilled)

403, forbidden

404, not found

500, server error

Given an int variable status, write a switch statement that prints out the appropriate label from the above list based on status.

I'm getting an error on this.

This is my code:

cout << "Enter a status";

cin >> status;

switch (status)

{

case 200:

break;

case 403:

break;

case 404:

break;

case 500:

break;

}

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 03:30
Some of your friends have gotten into the burgeoning field of time-series data mining, in which one looks for patterns in sequences of events that occur over time. purchases at stock exchanges--what’s being bought-- are one source of data with a natural ordering in time. given a long sequence s of such events, your friends want an efficient way to detect certain "patterns" in them--for example, they may want to know if the four events buy yahoo, buy ebay, buy yahoo, buy oracle occur in this sequence s, in order but not necessarily consecutively. they begin with a collection of possible events (e.g., the possible’ transactions) and a sequence s of n of these events. a given event may occur multiple times in s (e.g., yahoo stock may be bought many times in a single sequence s). we will say that a sequence s’ is a subsequence of s if there is a way to delete certain of the events from s so that the remaining events, in order, are equal to the sequence s’. so, for example, the sequence of four events above is a subsequence of the sequence buy amazon, buy yahoo, buy ebay, buy yahoo, buy yahoo, buy oracle their goal is to be able to dream up short sequences and quickly detect whether they are subsequences of s. so this is the problem they pose to you: give an algorithm that takes two sequences of even~s--s’ of length m and s of length n, each possibly containing an event more than once--and decides in time o(m n) whether s’ is a subsequence of s
Answers: 2
question
Computers and Technology, 24.06.2019 00:50
Which player type acts on other players? a. killer b. achiever c. explorer d. socializer
Answers: 1
question
Computers and Technology, 25.06.2019 09:20
Problem 3: (hand) write the member function implementations for the class hand, which simulates a hand of 2 cards, into the file hand.cpp. the relative strength of 2 hands are determined by the following rules: • a pair (two cards of the same number) is the strongest hand. • two cards of the same suit is the next strongest hand. • two cards of different numbers and suits is the weakest hand. • within the same kind of hands, the stronger hand is determined by the larger number. • if two hands are of the same kind and the larger numbers are the same, the stronger hand is given by the hand whose smaller number is larger. • if all above fails, the two hands are of equal strength. i.e., all suits are of equal strength. • 2 is the weakest number. an ace is stronger than a king. you are using a single deck of cards. so a hand of a♥a♥ is impossible. here are some examples:
Answers: 3
question
Computers and Technology, 25.06.2019 09:30
When recovering from a skid, make sure to as necessary to guide your vehicle toward the center of your lane. a. threshold steer b. counter steer c. oversteer d. understeer
Answers: 1
You know the right answer?
HTTP is the protocol that governs communications between web servers and web clients (i. e. browsers...
Questions
question
Mathematics, 17.10.2020 14:01
question
Social Studies, 17.10.2020 14:01
question
Mathematics, 17.10.2020 14:01
question
History, 17.10.2020 14:01
question
Mathematics, 17.10.2020 14:01
question
Geography, 17.10.2020 14:01
question
Computers and Technology, 17.10.2020 14:01
question
Physics, 17.10.2020 14:01
Questions on the website: 13722362