1
Anonymous
c_cpp
02/11/2024 9:08 AM
300 B
13
Indexable
#include <iostream>
using namespace std;
int asd(int a, int c)
{
for (int i = 0; a > 0; i++)
{
c = (a % 10) + (10*c);
a /= 10;
}
return c;
}
int main()
{
int a, c = 0;
cin >> a;
cout << asd(a, c);
}Editor is loading...
Leave a Comment