answersLogoWhite

0


Best Answer

#include<iostream>

#include<vector>#include<string>

int main()

{

std::vector<std::string> names;

for (int loop=0; loop!=10;)

{

std::cout << ++loop << " enter a name: ";

std::string name;

std::cin >> name;

names.push_back (name);

}

names.sort();

std::cout << "Sorted names:" << std::endl;

for (auto name : names)

std::cout << name << std::endl;

}

User Avatar

Wiki User

9y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

14y ago

#include

int main (void) { puts ("sort output"); return 0; }

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Write your own c plus plus functions for the following problem Print the sort output on the console?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering
Related questions

What is console application in c sharp?

The console application in C sharp(C#) is a simple application which takes input and returns output on a command line console, with the following data streams: standard input, standard output, and standard error.


Which of the following are the four major functions of a computer?

input processing storage output


Sort a book list in a library based on the discipline USING C plus plus programming?

Write your own C++ functions for the following problems:o Sort a book list in a library based on the disciplineo Print the sorted output on the console


Print the sorted output on the console?

Do, if you want to.


What does console header file does?

By writing console header file, if you mean to say about conio.h, then conio.h contains functions related to console input and output like clrscr() to clear the screen, getch() to get a character without enter key being pressed, getche() same as getch() but it shows the character entered.


What types of functions has a constant first difference between output values?

It doesn't make sense to type "the following..." if you don't provide a list.


What process do you need to have the following output?

The process that you need to do the following output depends on what the output is. The process you do to get one output would not be the same process you do to get a different output.


What is the full form of conioh?

Console Input Output Header


What do exclamation marks output to the console mean?

The transfer is working.


Which header files contain declaration for the files input and output functions and the macros defined and that are used with file input and output functions?

stdio.h


What is cprintf in graphics?

cprintf is to the console, printf to stdout (standard output). The only difference is stdout can be redirected but the console cannot.


In unix where the standard output is usually directed?

The current terminal or console.