Untitled

mail@pastecode.io avatar
unknown
c_cpp
8 months ago
242 B
0
Indexable
Never
#include <iostream>
#include <cmath>
using namespace std;
void ch(int a)
{
	int c = 0;
	while (a != 0)
	{
		int b = a % 10;
		c = c * 10 + b;
		a /= 10;
	}
	cout << c;
}
int main()
{
	int a;
	cin >> a;
	ch(a);
	return 0;
}
Leave a Comment