diff options
-rw-r--r-- | blarandom.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/blarandom.cpp b/blarandom.cpp index 4db224e..2a6136b 100644 --- a/blarandom.cpp +++ b/blarandom.cpp @@ -22,6 +22,7 @@ v0.1 - Initial release v0.2 - Added Makefile + v0.3 - Added help */ @@ -54,10 +55,16 @@ int main() { iss >> args[i]; } - if (!args[0].compare("-v")) { + if (!args[0].compare("-v") || !args[0].compare("--version")) { std::cout << "v" << version << std::endl; return 0; } + + if (!args[0].compare("-h") || !args[0].compare("--help")) { + std::cout << "Usage: !random [minimum bound] [maximum bound] [count] | Examples: !random : returns a number from 1 to 10 | !random 20 : Returns a number from 1 to 20 | !random 10 20 : Returns a number from 10 to 20 | !random 1 10 3 : Returns 3 random numbers from 1 to 10" << std::endl; + return 0; + } + if (args[2].empty()) { count = 1; |