Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Blog
Square of maximum
#include <bits/stdc++.h> #include <math.h> using namespace std; int main() { string S; int a,b,c; int ans; cin>>S; sort(S.begin(), S.end()); reverse(S.begin(), S.end()); a = S[0]-'0'; b = S[1]-'0'; c = S[2]-'0'; ans = (a*100)+(b*10)+c; cout<<ans*ans; }
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
Operator Overload
Inventory
simple serialization
27
Making pyramid using nested loop 1/2
Hacher Cup
BinTree playground
Memory_test
CS 201
Good1
Please log in to post a comment.