Untitled
unknown
plain_text
4 months ago
404 B
2
Indexable
#include <bits/stdc++.h> #define int long long using namespace std; template<typename T> void mx(T a,T b , T c,int q){ if(q == 2){ cout<<setprecision(4)<<max(a,max(b,c))<<endl; }else{ cout<<max(a,max(b,c))<<endl; } } main(){ int a,b,c; cin>>a>>b>>c; mx(a,b,c,1); double a1,b1,c1; cin>>a1>>b1>>c1; mx(a1,b1,c1,2); char a2,b2,c2; cin>>a2>>b2>>c2; mx(a2,b2,c2,3); }
Editor is loading...
Leave a Comment