- 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

7th Oct 2022, 10:41 AM
Peniel Boakye
Peniel Boakye - avatar
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.
7th Oct 2022, 10:50 AM
Lisa
Lisa - avatar
+ 3
Then you need to start learning C++ first before you can do the task.
7th Oct 2022, 10:52 AM
Lisa
Lisa - avatar
+ 1
What is your question?
7th Oct 2022, 10:43 AM
Lisa
Lisa - avatar
+ 1
What is terminal operator
7th Oct 2022, 11:45 AM
Dhruvil Dhaduk
Dhruvil Dhaduk - avatar
+ 1
Dhruvil Dhaduk "What is terminal operator" he probably means user...
9th Oct 2022, 12:49 AM
Bob_Li
Bob_Li - avatar
+ 1
I meant, the user
9th Oct 2022, 1:10 AM
Peniel Boakye
Peniel Boakye - avatar
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?
7th Oct 2022, 10:44 AM
Peniel Boakye
Peniel Boakye - avatar
0
I’ve not started learning c++, which is why i need help
7th Oct 2022, 10:51 AM
Peniel Boakye
Peniel Boakye - avatar
0
Okay
7th Oct 2022, 10:52 AM
Peniel Boakye
Peniel Boakye - avatar
9th Oct 2022, 6:49 AM
Daniel
Daniel - avatar
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<<' '; }
9th Oct 2022, 6:59 AM
Bob_Li
Bob_Li - avatar
0
Awesome, it worked!
12th Oct 2022, 7:58 PM
Peniel Boakye
Peniel Boakye - avatar
0
Thanks
12th Oct 2022, 7:58 PM
Peniel Boakye
Peniel Boakye - avatar