Ask Question
6 August, 02:29

std::string x[n]; int mode1count = 0; / / msft int mode2count = 0; / / appl int mode3count = 0; / / csco int mode4count = 0; / / imb int i; for (i = 0; i < n; + +i) / / Set the array of strings x[i] = modeList[i]; for (i = 0; i < n; + +i) { if (x[i] = = "msft") + +mode1count; else if (x[i] = = "appl") + +mode2count; else if (x[i] = = "csco") + +mode3count; else if (x[i] = = "imb") + +mode4count; }

+4
Answers (1)
  1. 6 August, 02:57
    0
    std::string x[n];

    int mode1count = 0; / / msft

    int mode2count = 0; / / appl

    int mode3count = 0; / / csco

    int mode4count = 0; / / imb

    int i;

    for (i = 0; i < n; + +i) / / Set the array of strings

    x[i] = modeList[i];

    for (i = 0; i < n; + +i)

    {

    if (x[i] = = "msft")

    ++mode1count;

    else if (x[i] = = "appl")

    ++mode2count;

    else if (x[i] = = "csco")

    ++mode3count;

    else if (x[i] = = "imb")

    ++mode4count;

    }

    Explanation:

    It is important to ensure that there is adequate space and necessary punctuation when developing codes and programming to avoid getting error messages when running the codes. In this problem, the codes required are shown in the answer section. The codes are properly writing and arranged.
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “std::string x[n]; int mode1count = 0; / / msft int mode2count = 0; / / appl int mode3count = 0; / / csco int mode4count = 0; / / imb int i; ...” in 📗 Engineering if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers