1
unknown
c_cpp
8 months ago
225 B
1
Indexable
Never
#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); }
Leave a Comment