- 1
Why the following code is running the results of -234 and 123?
#include <iostream> using namespace std; void f(int x) { int t; if(x<0){cout<<"-";x=-x;} t=x%10;x=x/10; if(x!=0)f(x); cout<<t; } int main() { f(-234); cout<<'\n'; f(123); cout<<'\n'; return0; }
1 Respuesta
0
this program is very interesting. I can understand but can't explan.