#include <vector>using namespace std;class AddMultiply{public: vector <int> makeExpression(int y){ vector<int> ret; ret.push_back( 2 ); ret.push_back( 2 ); ret.push_back( y - 4 ); while( ret[2] == 0 || ret[2] == 1 ){ ret[1]++; ret[2]-=2; } return ret; }};
Standard input is empty
/usr/lib/gcc/i486-linux-gnu/4.8/../../../i386-linux-gnu/crt1.o: In function `_start': (.text+0x18): undefined reference to `main' collect2: error: ld returned 1 exit status
Standard output is empty
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!