Untitled

mail@pastecode.io avatar
unknown
c_cpp
20 days ago
261 B
1
Indexable
Never
#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;
}
Leave a Comment