#include<iostream>
usingnamespace std;
int main()
{
void toBeSorted(int arr[], int size);
{
bool swap = false;
int i, k, temp, bottom = 5 - 1, arr[20];
while (swap != false)
{
{
for (int i = 0; i < 5; i++)
{
cout << "enter no." << i << "/n";
cin >> arr[k];
for (int i = 0; i < 5; i++)
{
for (int k = 0; k < bottom; k++)
{
if (arr[k] > arr[k + 1])
{
temp = arr[k];
arr[k] = arr[k + 1];
arr[k + 1] = temp;
swap = true;
}
}
}
cout << "Result" << arr[k] << endl;
} while (swap != true);
}
getchar();
return 0;
}
}
}
I want to cin numbers and also display the pass process the errors I get are "Warning C4101 'i': unreferenced local variable" and "Error C4700 uninitialized local variable 'k' used"