hajiramansoor139 hajiramansoor139
  • 18-11-2020
  • Computers and Technology
contestada

Program that take 3 number and display them in ascending order c++

Respuesta :

tonb
tonb tonb
  • 18-11-2020

Answer:

#include <iostream>     // std::cout

#include <algorithm>    // std::sort

#include <vector>       // std::vector

using namespace std;

int main()

{

   vector<int> myvector{ 8, 1, 3 };

   std::sort(myvector.begin(), myvector.end());

   for (int x : myvector)

       cout << x << " ";

}

Explanation:

Use STL libraries where you can to keep your code robust!

Answer Link

Otras preguntas

why did the cow only give buttermilk
A bag contains 6 red jelly beans, 4 green jelly beans, and 4 blue jelly beans. If we choose a jelly bean, then another jelly bean without putting the first one
what is the answer to this math problem(7a-1)^2
The fourth car on the frieght train was filled with grain
Which of these actions was NOT a step taken by Southerners to stop African Americans form voting? a. forcing African Americans to show picture IDs before voting
The outermost layer of earth is called the mantle t or f
A shipping company ships certain boxes at a special rate. the boxes must not have a volume greater than 2500 cm 3. can the box be shipped at the special rate? e
PLEASE HELP ME Which of the following was one of Hitler's methods of addressing Germany's economic problems during the Great Depression? A. printing new curren
Which class of fish accounts for 95% of all fish species
write the number 31 in tens and ones. 2 tens ? Ones