Question: Using C# Write a console app that would generate special random numbers using command-line arguments as described below: The first two arguments serve as the

Using C# Write a console app that would generate special random numbers using command-line arguments as described below: The first two arguments serve as the lower and upper bounds for the list of random numbers to be generated. All remaining arguments (from the third and onward) indicate a list of integer numbers within the above range that to be excluded from the generated random numbers. The lower bound, upper bound as well as the list of excluded numbers will be passed to method GenerateSpecialRandom which will generate 50 valid random numbers and return them to the Main method using an out array parameter. Main() method will take the random numbers and output them separated with commas (,) on the console.

Hint: method GenerateSpecialRandom would need to have a variable number of arguments. (i.e., by using params int[] validNumbers ) Sample Run: // a list of random numbers between 5 to 15 but excluding 7,11,9, and 5 myApp.exe 5 15 7 11 9 5 Final generated random numbers are: 14, 12, 6, 10, 14, 8, 13, 10, 8, //No 5,7,9 or 11 are among them!

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!