given a string of nos, find the largest no out of them

 // Online C++ compiler to run C++ program online

#include <iostream>

#include<string>

#include<algorithm>

using namespace std;

int main() {

    // Write C++ code here

   string s="54123";

   sort(s.begin(), s.end(), greater<char>());

   cout<<s;


    return 0;

}

Comments

Popular posts from this blog

Sum of Even Numbers till N

Find the Runner-Up Score!

Print All Substrings