Hello, I'm writing a program that i need to sort out the different lengths of the list of words in my array. I'm not sure where to even begin. I think I need to use the bouble sorting technique but I'm not sure. Anyone know what I am trying to do? This is my code so far. I just need some help getting started on sorting it out so it will look something like this.
#include <iostream>
#include <string>
using namespace std;
int main()
{
const int SIZE = 100;
string words[SIZE];
int i, length1=1;
for (i = 0 ; i < SIZE; i++)
{
cout<<"Enter a list of words: Enter the word END to end your list. "<<endl;
cin >> words[i];
if (words[i] == "END")
break;
}
cout<<" "<<endl;
cout<<"Words entered were: "<< endl;