Sorting in Lexicographical Order

#include <iostream> using namespace std; int main() { string str[10], temp; cout << "Enter words (<=10): " << endl; for(int i = 0; i < 10; ++i) { getline(cin, str[i]); } for (int i = 0; i < 9; ++i) { for (int j = 0; j < 9 - i; ++j) { if (str[j]... Continue Reading →

Create a website or blog at WordPress.com

Up ↑

Design a site like this with WordPress.com
Get started