Ask Question
24 May, 23:15

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; }

+5
Answers (1)
  1. 25 May, 00:01
    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 you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers