### Question (Need help)

Wassup, I'm in a bit of frustration right about now. I'm having trouble with a simple program that I need done by tomorrow, Im not that good of a programmer.

I need coding for the following program:
Visual C++ 2008 Express Edition:

Write a program which will allow users to choose to generate numbers for the following lottery game options. Pick 3(0-9 numbers, numbers can repeat), Pick 4(0-9 numbers, numbers can repeat, Cash 5(5 numbers from 1-34, numbers cannot repeat), Mega Millions(5 numbers 1-56 which cannot repeat, 1 number from 1-46 which may be a repeat of one of the first 5 numbers.)

I also need help structuring the form1.h[Design*], if possible?
IC
Here you go:

 ``123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101`` ``````#include #include #include using namespace std; void GenerateRandomNumbers(int Numbers[], int Count, int StartingNumber, int EndingNumber, default_random_engine* rn, bool bUnique = false) { int number = 0; for(int x = 0; x < Count; x++) { number = (*rn)() % EndingNumber + StartingNumber; if(bUnique) { for(int i = 0; i < x; i++) { if(number == Numbers[i]) { number = (*rn)() % EndingNumber + StartingNumber; i = 0; } } } Numbers[x] = number; } }; void OutputNumbers(int Numbers[], int Count) { cout<>selection; switch(selection) { case 1: Numbers = new int[10]; GenerateRandomNumbers(Numbers, 10, 0, 9, &rn); OutputNumbers(Numbers, 10); break; case 2: Numbers = new int[10]; GenerateRandomNumbers(Numbers, 10, 0, 9, &rn); OutputNumbers(Numbers, 10); break; case 3: Numbers = new int[5]; GenerateRandomNumbers(Numbers, 5, 1, 34, &rn, true); OutputNumbers(Numbers, 5); break; case 4: Numbers = new int[5]; GenerateRandomNumbers(Numbers, 5, 1, 56, &rn, true); OutputNumbers(Numbers, 5); cout<<" And your Mega Number is: **"<< (rn() % 46) + 1 <<"**"<>Playing; } cout<<"Thanks for playing! Hope you win!"<

Hope you win!
I now know where the concept of "Free Love" from the sixties hippy movement stemmed from.
Topic archived. No new replies allowed.