/*Copyright ElohimTov*/ /* //Name:ElohimTovSolveCode - ConditionalStatements - C++ Solution //Problem: HackerRank - 30 Days of Code - ConditionalStatements //Current File: ElohimTovSolve_CondStatements.(cpp).txt //Compile-able File: ElohimTovSolve_CondStatements.cpp //Date: 11/06/2018 //Tale: ElohimTov Solve's Solution to HackerRank.com's //Conditional Statements problem, in C++ programming language. //Problem link at https://elohimtov.com/elohimtov.info. */ #include using namespace std; int main() { int N; cin >> N; cin.ignore(numeric_limits::max(), '\n'); int zero = 0; int one = 1; int two = 2; int five = 5; int six = 6; int twenty = 20; if(abs(N%two) == one) cout << "Weird" << endl; else //if(abs(N%two) == zero) { if(N>=two && N<=five) cout << "Not Weird" << endl; else if(N>=six && N<=twenty) cout << "Weird" << endl; else cout << "Not Weird" << endl; }//ends outer if/else statement return }// ends main function /*Copyright ElohimTov*/