Using markdown
#include <iostream>
using namespace std;
void recursion(int i) {
if(i == 10)
return;
cout << i << " ";
recursion(i+1);
cout << i << " ";
}
int main() {
recursion(1);
return 0;
}
Using Control K
shows corrected code
#include <iostream>
using namespace std;
void recursion(int i) {
if(i == 10)
return;
cout << i << " ";
recursion(i+1);
cout << i << " ";
}
int main() {
recursion(1);
return 0;
}