i need someone to make me a program!

Discussion in 'Programming General' started by firekill137, Apr 19, 2008.

i need someone to make me a program!
  1. Unread #1 - Apr 19, 2008 at 4:19 PM
  2. firekill137
    Referrals:
    0

    firekill137 Guest

    i need someone to make me a program!

    hi all i need to someone to create a program for me ... i want to be eable to make a list of people and it chose one of them all i ask! coz i wanna make a lotto ingame so i need that :)
     
  3. Unread #2 - Apr 19, 2008 at 6:41 PM
  4. Nullware
    Joined:
    Jan 30, 2007
    Posts:
    1,761
    Referrals:
    4
    Sythe Gold:
    0

    Nullware Guru

    i need someone to make me a program!

  5. Unread #3 - Apr 19, 2008 at 7:56 PM
  6. firekill137
    Referrals:
    0

    firekill137 Guest

    i need someone to make me a program!

    not working i added u on msn ...
     
  7. Unread #4 - Apr 20, 2008 at 3:47 PM
  8. megajosh2
    Joined:
    Apr 18, 2008
    Posts:
    59
    Referrals:
    0
    Sythe Gold:
    0

    megajosh2 Member

    i need someone to make me a program!

    Dude go look through some C++ Tutorials.
     
  9. Unread #5 - Apr 21, 2008 at 6:17 PM
  10. Fouisgras
    Joined:
    Jan 21, 2007
    Posts:
    2,202
    Referrals:
    2
    Sythe Gold:
    0

    Fouisgras Jansen's Lover
    $5 USD Donor

    i need someone to make me a program!

    An easy prog to make in c. Just make it printf a random # from one to however many lotto tickets there are.
     
  11. Unread #6 - May 24, 2008 at 2:27 PM
  12. MavFan07
    Joined:
    Dec 18, 2007
    Posts:
    35
    Referrals:
    0
    Sythe Gold:
    0

    MavFan07 Member

    i need someone to make me a program!

    I made one in c++. It's probably not the best code...but it works. Here you go:

    EDIT: alright, a couple of things:
    1.It's annoying to type y or Y after every username, so instead you could change it so it gets out of the first do/while loop if the username is quit999(or something). I could edit that if you arn't very good with c++.
    2.Sometimes the random number picked will be zero, I suggest picking a new number when this happens.

    tell me what you think

    Code:
    #include <iostream>
    #include <cstdlib>
    using namespace std;
     
    int main()
    {
    char anotherNum='y';
    char quit='y';
    int entries=1; //number of people on list
    string userName[100];
     
    do
    { 
    cout << "Username: ";
    cin >> userName[entries];
    entries++;
    cout << "Would you like to add another? ";
    cin >> quit;
    }
    while ((quit == 'y') || (quit == 'Y'));
    do
    {
    for(int i=1; i < entries; i++)
    {
    cout << i << ":" << userName[i] << endl;
    }
    int luckyNum= (rand() % entries);
    cout << "There are " << entries-1 << " entries on the list." << endl;
    cout << "The lucky number was " << luckyNum << endl;
    cout << userName[luckyNum] << " is the winner!" << endl;
    cout << "Would you like to pick another number? ";
    cin >> anotherNum;
    }
    while ((anotherNum == 'y') || (anotherNum =='Y'));
     
    return 0;
    }
     
< How to make a simple updater | [MIRRORS]VB6 Download [RS] [MU] >

Users viewing this thread
1 guest


 
 
Adblock breaks this site