#include <iostream>
#include <string>
usingnamespace std;
void bubbleSort(string[], int);
int main ()
{
int y = 0;
string Client[12] = { "Acme Construction Machinery design", "Johnson Electrical Switch manufacturing", "Brown Heating and Cooling Boiler design", "Jones Computers Computers sales",
"Williams Cleaning Equipment Machinery sales","Smith Switches Switch manufacturing"};
cout << "Client"<< " Business type\n" << endl;
for (int i=0; i<12; i++)
cout << Client[i] << endl;
return 0;
}
void bubbleSort(string arr[], int n)
{
bool swapped = true;
int j = 0;
string tmp;
while (swapped)
{
swapped = false;
j++;
for (int i = 0; i < n + j; i++)
{
if ( arr[i].compare(arr[i + 1]) )
{
tmp = arr[i];
arr[i] = arr[i +1];
arr[i + 1] = tmp;
swapped = true;
}
}
}
}
1 2 3 4 5 6 7 8 9 10 11 12 13 14
1
1>Deleting intermediate and output files for project 'WeekSixProgram', configuration 'Debug|Win32'
1>Compiling...
1>WeekSixProgram.cpp
1>Compiling manifest to resources...
1>Microsoft (R) Windows (R) Resource Compiler Version 6.1.6723.1
1>Copyright (C) Microsoft Corporation. All rights reserved.
1>Linking...
1>LINK : C:\Users\Martin\Documents\Visual Studio 2008\Projects\WeekSixProgram\Debug\WeekSixProgram.exe not found or not built by the last incremental link; performing full link
1>Embedding manifest...
1>Microsoft (R) Windows (R) Resource Compiler Version 6.1.6723.1
1>Copyright (C) Microsoft Corporation. All rights reserved.
1>Build log was saved at "file://c:\Users\Martin\Documents\Visual Studio 2008\Projects\WeekSixProgram\WeekSixProgram\Debug\BuildLog.htm"
1>WeekSixProgram - 0 error(s), 0 warning(s)
========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========