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
Air bags expand at up to __________ mph. A. 70 B. 100 C. 150 D. 200
almond37 [142]
Airbags expand
D. 200 mph
7 0
3 years ago
What is working with others to find a mutually agreeable outcome?
eduard

Negotiation is one possible answer to this question, I believe, though there are other words which mean similar things that could also suffice. For example, compromise is very similar in meaning, though this specifically means each person is conceding something to find an agreement.

5 0
3 years ago
Convert the following hexadecimal<br><br> numbers to decimal: a) 0xE4 b) 0x3AC c) 0xFF
creativ13 [48]

Answer:

a) 228

b) 940

c) 255

Explanation:

To convert a hexadecimal number to decimal, multiply each hex digit by 16^(position-1) and add the components.

For example, 0x 34 = 3* 16^(2-1) + 4*16^(1-1) = 48 + 4 = 52

Evaluating the given numbers:

a) 0xE4 =>

E corresponds to 14. So the decimal representation is 14*16 + 4 = 228

b) 0x3AC =>

A corresponds to 10 and C to 12. So the decimal representation is 3*16^2 + 10*16 + 12 = 940

c) 0xFF =>

F corresponds to 15. So the decimal representation is 15*16 + 15 = 255

6 0
3 years ago
Example of analog computer and digital computer ​
Nataliya [291]
Give some famous examples of analog computers. Ans. Some examples are operational amplifiers, mechanical integrators, slide rules, tide predictors, electric integrators, etc. These are in use to solve the problems related to partial differential equations, electronic machines, and also neural networks.(Analog). Examples of a digital electronic computers include the IBM PC, the Apple Macintosh as well as modern smartphones. ... An example of a parallel computation system using the abacus would be a group of human computers using a number of abacus machines for computation and communicating using natural language.(Digital)
4 0
3 years ago
What is generation of computer? List the generation of computer with devices used.
OLEGan [10]

Answer:

1) 1st Gen : ENIAC

2nd Gen : IBM 7030

3rd Gen : IBM 360 / 370

4th Gen : Apple

5th Gen : Sun Workstation

2) Features of 2nd Gen computers

• Small in size

• Less heat generation

• Low power consumption

• Comparatively faster than the first generation

3) Quality , Storage of Text , Time Saving , Security

4) • Analog computer has no state.

• Digital computer has On and Off these 2 steps.

5) • Large in size

• Higher computing power

• Expensive

• Rare

3 0
3 years ago
Other questions:
  • Invalid length parameter passed to the LEFT or SUBSTRING function (below)".
    6·1 answer
  • Explain why the scenario below fails to meet the definition an assembly line.
    10·1 answer
  • A dmz is a subnet of _____________ accessible servers placed outside the internal network.
    10·1 answer
  • Is LTE faster than 4G?
    8·1 answer
  • Which language do you use to add functionality to a web page
    8·1 answer
  • A ____ error occurs when an instruction does not follow the grammar of the programming language
    6·1 answer
  • WHY IS BRAINLY NOTIFICATIONS LIKE THIS?????
    15·2 answers
  • How can a user remove or delete a Pivot Table?
    8·1 answer
  • Can I ask a question about information technology (IT)...
    11·1 answer
  • 12. In Justify the text is aligned both to the right and to the left margins, adding extra space between words as necessary *
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!