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
Sonora wants to extend the cells to be added in her formula. what is the quickest way to add more sells?
alexira [117]
It’s D left click that’s the answer
8 0
4 years ago
Read 2 more answers
1.The character escape sequence to force the cursor to go to the next line is________: 2. The character escape sequence to force
Luda [366]

Answer:

Hi there Kaylee! The answers to the blanks are as follow:

1.The character escape sequence to force the cursor to go to the next line is \n

2. The character escape sequence to force the cursor to advance forward to the next tab setting is \t  

3.The character escape sequence to represent a single quote \'

4.The character escape sequence to represent a double quote is \"

5.The character escape sequence to represent a backslash is \\

Explanation:

Character escape sequences are used for processing of special characters that may otherwise be used in a context where those characters are reserved as keywords or carry other symbolic reference. If these are not escaped, the output will not be correct.  

6 0
3 years ago
Which of the following best describes a computer virus? another name for a software bug the product of a computer crash software
nikdorinn [45]
A computer virus is software that can spread itself
8 0
4 years ago
Read 2 more answers
Which for loop will iterate 100 times? Group of answer choices for (i = 0; i &lt; 99; i++) for (i = 1; i &lt; 99; i++) for (i =
cupoosta [38]

Answer:

for (i = 0; i < 100; i++);

Explanation:

8 0
3 years ago
Read 2 more answers
this email belongs to another account. enter a different account. does this mean my brainly account can only use one device and
azamat

Answer:

I believe it is saying your login credentials are somehow incorrect otherwise you should be able to log into many devices

Explanation:

5 0
3 years ago
Read 2 more answers
Other questions:
  • Peer to peer software can do the following except
    9·1 answer
  • What is the process called if you are erasing data on your hard drive from a MAC
    12·1 answer
  • Rachelle is an office manager for an active real estate agency. She’s overseeing a transition to a more complete reliance on ele
    9·1 answer
  • 4. Write an appropriate comment for describ-
    11·1 answer
  • Which model emphasizes the risk analysis phase of development
    12·1 answer
  • Can someone help me with my homework?
    7·1 answer
  • What computer programs can you work with to present and post your e-portfolio on the Internet?
    11·1 answer
  • Fill in the blanks!
    14·1 answer
  • Of all excavation hazards, _______ poses the greatest risk
    8·1 answer
  • Help FAST PLS in complete sentences discuss the process used to determine your credit score. Do you think it is fair? Why or why
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!