- 3
C++
design a simple c++ console application that will prompt a terminal opeator for three characters, accept thses characters as input, sort them into ascending sequence and output them to the screen
13 Answers
+ 7
You mean you want others to do your homework for you? Sololearn is NOT A CODE WRTING SERVICE.
It is a learning platform. We can help you to solve it yourself.
Start by getting 3 characters as input. You can store them in a character array. Link your code attempt so we can check on it.
+ 3
Then you need to start learning C++ first before you can do the task.
+ 1
What is your question?
+ 1
What is terminal operator
+ 1
Dhruvil Dhaduk
"What is terminal operator"
he probably means user...
+ 1
I meant, the user
0
Can you design a simple c++ console application that will prompt a terminal opeator for three characters, accept thses characters as input, sort them into ascending sequence and output them to the screen for me?
0
Iâve not started learning c++, which is why i need help
0
Okay
0
is it you want?
https://code.sololearn.com/caX6cK3g3jmb/?ref=app
0
//something like this
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main() {
vector<string> v;
string s;
while(cin>>s)
v.push_back(s);
cout<<"unsorted:\n";
for(auto i: v)
cout<<i<<' ';
cout<<"\nsorted:\n";
sort(v.begin(), v.end());
for(auto i: v)
cout<<i<<' ';
}
0
Awesome, it worked!
0
Thanks