Muggle Detector

/* Ye mera project hai. Copyright claim zaroor karunga. (C) Sudipto Ghosh. 2018. */ #include <iostream> using namespace std; // defining wizards and muggles string w = "Wizard"; string m = "Muggle"; void doJudgement() { int r; // presenting possible reactions cout << "(1) Haan Bhai. Kar chuka wo toh ._." << endl; cout << "(2) G**nd fat jaegi saale ki Gringott me dragon hai xD" << endl; // waiting for you to reply cout << "Your reply: "; cin >> r; // giving muggles the Dursley treatment they deserve if (r == 1) { cout << "You are a bloody " << m << "! GET OUT OF HERE!" << endl; } // giving wizards rewards to buy a new cauldron if (r == 2) { cout << "You are a true " << w << "! You get 3 Galleons, 16 Sickles and 15 Knuts as goodwill money" << endl; } } int main() { // the billion dollar question cout << "Kya Nirav Modi bank fraud kar sakta hai?" << endl; // time to find out who are you doJudgement(); return 0; }
This code detects whether the user is a muggle or a wizard based on the user's response to a trivial question.

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.