Oh, sorry. the problem is that the program should be able to do this option:
./combinations -n -r 50 8 //numbers are examples
or
./combinations -r -n 8 50
It doesn't do the above when I run the program as above. This is the result output:
(if I enter
./combinations -n -r 50 8): output is this:
Usage: ./combinations [-n <number> [-r <number>]
(if I enter
./combinations -r -n 8 50) output is this:
usage: ./combinations [-n <number>] [-r , <number>]
Along with what it currently does:
1 2 3
|
./combinations -n 50 -r 8
and ./combinations-r 8 -n 50
|
So, it should be able to run in the following ways:
./combinations -n 50 -r 8 //it does run
and
./combinations-r 8 -n 50 //it does run
and
./combinations -n -r 50 8 //it doesn't run
and
./combinations -r -n 8 50 // it doesn't run
It is also suppose to ask user if the want to try new set of numbers. Which it does do if I run program as:
./combinations
And then user inputs values while program is running which is fine, but like I was saying, it also has to ask user same thing if the numbers are enter as:
./combinations -n 50 -r 8 //it does run
and
./combinations-r 8 -n 50 //it does run
and
./combinations -n -r 50 8 //it doesn't run
and
./combinations -r -n 8 5
And I don't even know if it is possible to make that happen......