until now u didnt solve my problem use c++ to input three words and then put them from largest to smallest using if statement

using namespace std;

int main()
    char word;
    int length;
    cout<<"please input three words";
    if (length>5)
    word= 'number 1';
    else if (length =5)
    word= 'number 2';
    else if (length<5)
       word = 'number 3';
     system ("pause");
    return 0 ;

1. Don't forget code tags.

2. char word; only declares a character. To use strings you have to include the string header file.

I see you never read your previous threads.

>>until now u didnt solve my problem use c++
WE are not supposed to solve YOUR homework, you are.

Ok, this took me all of 15 minutes to write

#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
using namespace std;

int main()
    vector<string> array;

    for(int i = 0; i < 3; i++)
        cout << "Enter string #" << i+1 << ":  ";
        string word;
        cin >> word;
    sort(array.begin(), array.end());
    vector<string>::iterator it;
    for(it = array.begin(); it != array.end(); it++)
        cout << *it << "\n";

    return 0;
This article has been dead for over six months. Start a new discussion instead.