Answer to Question #157839 in C++ for Ikraam

Question #157839

Nim game code c++


1
Expert's answer
2021-01-23T22:20:02-0500
#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!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS