#include <iostream> using namespace std; int d; long int a,b; int main() { cin >> d; for (int i=1;i<=d;i++) { cin >> a >> b; for (int j=a+1;j<b;j++) { if (j%2==0) {cout<<j<<' ';} } cout << endl; } return 0; }
2 3 9 4 9
4 6 8 6 8
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!