Question #157839

Nim game code c++


Expert's answer

#include <bits/stdc++.h>
using namespace std;
class Solution {
public:
   bool canWinNim(int n) {
      return n%4!=0;
   }
};
main(){
   Solution ob;
   cout << (ob.canWinNim(5));
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

LATEST TUTORIALS
APPROVED BY CLIENTS