I recently wrote this simple C++ program and I was wondering if it would process faster if it was in a recursion. However, I did not manage to find a way to successfully write it in recursion so I am asking if you could help me with making it with recursion.
#include<iostream> using namespace std; int main() { for (int i1 = 1; i1 <= 45; i1++) { for (int i2 = i1 + 2; i2 <= 46; i2++) { for (int i3 = i2 + 2; i3 <= 47; i3++) { for (int i4 = i3 + 2; i4 <= 48; i4++) { cout<<i1<<" "<<i2<<" "<<i3<<" "<<i4<<endl; } } } } return 0; }