I think i cant understand something in the logic of my cycles, cant u match my mistake? We need to reverse the number. My code:
#include <iostream>
#include <string>
using namespace std;
int main(){
string a;
char b;
cin >> a;
for (int i = 0; i < a.size(); i++){
for (int j = a.size(); j > 0; j--){
b = a[i];
a[i] = a[j];
a[j] = b;
break;
}
}
cout << a;
}