Untitled
unknown
c_cpp
a year ago
628 B
4
Indexable
//первая #include <iostream> using namespace std; int intDigits(int num){ int reverse; while (num > 0) { int rem = num % 10; reverse = reverse * 10 + rem; num /= 10;} return reverse; } int main() { int k;cin>>k; cout<<intDigits(k); } //вторая #include <iostream> using namespace std; void sort3(float a, float b, float c) { if (a > b) { swap(a, b); } if (a > c) { swap(a, c); } if (b > c) { swap(b, c); } cout << a << " " << b << " " << c << endl; } int main() { float a, b, c; cin>>a>>b>>c; sort3(a, b, c); }
Editor is loading...
Leave a Comment