Comment on: C++,Recursion,Three Number combination if their sum less than 10.
1 04 Aug 2016 04:20 u/2-5318008 in v/programmingComment on: C++,Recursion,Three Number combination if their sum less than 10.
Yes I must, too much damn java at work.
Comment on: C++,Recursion,Three Number combination if their sum less than 10.
Haven't done c++ in a while, so this could be, ya know, not the correct syntax, but you'll figure it out.
public void lt_ten(int i, int j, int k){
if((i + j + k + 1) < 10)
{
lt_ten(i + 1, j, k);
lt_ten(i, j+1, k);
lt_ten(i, j, k +1);
}
cout << '{' + i + ',' + j + ',' + k + '}\n';
}
I can't see one. Sometimes lower level problems help mix it up in contrast to the technically in depth articles which apply to ~15% of programmers and 10% of programmers understand (looking at you RUST). A lower level problem, or particularly a fun mid level problem can help bring more programmers together.
Though yes, it is annoying seeing other people's homework, they don't benefit from having others do their homework, and sometimes I enjoy seeing unique problems, I hate see the giant problem lists that float around. In the mean time, their incompetence (from not doing their homework) makes the rest of us look better on the market, so it's not helping them, and it's not hurting us.