1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
vivado [14]
3 years ago
14

Write a program that prompts the user to enter three words. The program will then sort the words in alphabetical order, and disp

lay them on the screen. The program must be able to support words with both uppercase and lowercase letters. You must use C style strings (string class).
Computers and Technology
1 answer:
Softa [21]3 years ago
3 0

Answer:

#include <iostream>

#include<bits/stdc++.h>

using namespace std;

bool sorter(string a, string b)

{

   return a<b;

}

int main(){

   string wordList[3];

   string word;

   for (int i = 0; i < 3; i++){

       cout<< "Enter word: ";

       cin>> word;

       wordList[i] = word;

   }

   sort(wordList, wordList+3, sorter);

   for (int i = 0; i < 3; i++){

       cout<< wordList[i]<< "\n";

}

}

Explanation:

The C++ source code prompts the user for string words that are appended to the wordList array. The array is sorted with the sort() function from the C++ bits library. The finally for loop statement prints out the items in the array.

You might be interested in
I wanna start answering questions for people, but I don't quite know how. Can you help me?​
Vsevolod [243]

Answering questions on brainly?

6 0
3 years ago
The cameras picture review function allows you to look at the _ you've taken
xxMikexx [17]

Answer:

Explanation:

Pictures

6 0
3 years ago
If you are working in a word-processing program and need to learn more about its features, the best place to get assistance is f
attashe74 [19]
If you are working in a word-processing program and need to learn more about its features, the best place to get assistance is from the <span>application's Help menu. The help menu is usually located on the top right or left hand side corner of your window.</span>
3 0
3 years ago
Read 2 more answers
What is a browser cookie?
nikitadnepr [17]

B) its a small peice of data that tracks your preferances on diffrent websites

Have a great day !

6 0
3 years ago
Read 2 more answers
Question 10 of 10
ValentinkaMS [17]

Answer:

C. Dow Jones

Explanation:

It’s the Dow Jones certainly, and we also know it as Dow 30. You will find with a little research that Dow Jones is an index of the 30 carefully chosen blue-chip stocks, and general industrial stocks. And this is price prejudiced average, and of 30 stocks that can be well-thought-out as an all-purpose measure for the whole stock market performance.

3 0
3 years ago
Other questions:
  • Select the correct answer.
    7·2 answers
  • Write a function called calculate() that accepts three integer Numbers as arguments, compute these values : Sum and Product and
    7·1 answer
  • Which of the following is a full selector?
    12·1 answer
  • The overall visual look of a chart in terms of its graphic effects, colors, and backgrounds is the:
    5·1 answer
  • Write an expression using membership operators that prints "Special number" if special_num is one of the special numbers stored
    12·1 answer
  • Fill in the blank: _________ is Google’s machine-learning artificial intelligence system that interprets people’s searches to fi
    9·1 answer
  • People who enjoy working with their hands might enjoy a career as a/an
    9·1 answer
  • Consider the following code segments that are potential replacements for /* missing code */.
    6·1 answer
  • How do you give people a brianly i am knew as u can tell
    6·2 answers
  • What do you mean by Graphics editing​
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!