Untitled

mail@pastecode.io avatar
unknown
c_cpp
2 months ago
628 B
1
Indexable
Never
//первая
#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);
 
    
      
}
Leave a Comment