Untitled
unknown
c_cpp
2 years ago
261 B
8
Indexable
#include <iostream>
#include <cmath>
using namespace std;
int ch(int a)
{
int c = 0;
while (a != 0)
{
int b = a % 10;
c = c * 10 + b;
a /= 10;
}
return c;
}
int main()
{
int a;
cin >> a;
int c = ch(a);
cout << c;
return 0;
}Editor is loading...
Leave a Comment