Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <ctime>
- #include <cstdlib>
- using std::cout; using std::endl; using std::cin;
- const int size = 10;
- main() {
- //declare array and other variables
- //assign(...) // fill array with 0
- //draw(...) // select 10 non-repeating random numbers
- //entry(...) // get user input
- //use check() to compare user input against lottery numbers
- //and output whether user won
- //printOut(...) // outputs seleced lottery numbers
- }
- void assign(int wins[]) {
- }
- void check(int wins[], int num) {
- for (int i = 1; i < size; ++i) {
- if (num = wins[i]) {
- return true;
- }
- else if (num != wins[i]) {
- return false;
- }
- }
- }
- void draw(int wins[]) {
- int numOfNum = 0;
- int ranNum;
- while (numOfNum < size) {
- srand(time(nullptr));
- ranNum = (rand() % 1000) + 1;
- }
- }
- void entry(int userInput) {
- cout << "Enter a number from 1 to 1000: ";
- cin >> userInput;
- }
- void printOut() {
- cout << "The lottery numbers are: ";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement