Advertisement
Guest User

Untitled

a guest
Feb 25th, 2018
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.00 KB | None | 0 0
  1. #include <iostream>
  2. #include <ctime>
  3. #include <cstdlib>
  4. using std::cout; using std::endl; using std::cin;
  5. const int size = 10;
  6.  
  7. main() {
  8.     //declare array and other variables
  9.  
  10.         //assign(...) // fill array with 0
  11.         //draw(...)       // select 10 non-repeating random numbers
  12.         //entry(...)      // get user input
  13.         //use check() to compare user input against lottery numbers
  14.         //and output whether user won
  15.         //printOut(...)   // outputs seleced lottery numbers
  16. }
  17.  
  18. void assign(int wins[]) {
  19.  
  20.  
  21. }
  22.  
  23. void check(int wins[], int num) {
  24.    
  25.     for (int i = 1; i < size; ++i) {
  26.         if (num = wins[i]) {
  27.             return true;
  28.         }
  29.         else if (num != wins[i]) {
  30.             return false;
  31.         }
  32.     }
  33. }
  34.  
  35. void draw(int wins[]) {
  36.  
  37.     int numOfNum = 0;
  38.     int ranNum;
  39.  
  40.     while (numOfNum < size) {
  41.         srand(time(nullptr));
  42.         ranNum = (rand() % 1000) + 1;
  43.  
  44.     }
  45.    
  46. }
  47.  
  48. void entry(int userInput) {
  49.    
  50.     cout << "Enter a number from 1 to 1000: ";
  51.     cin >> userInput;
  52.  
  53. }
  54.  
  55. void printOut() {
  56.  
  57.     cout << "The lottery numbers are: ";
  58. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement