GIDForums  

Go Back   GIDForums > Computer Programming Forums > CPP / C++ Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 03-Dec-2007, 20:47
dmb2140 dmb2140 is offline
New Member
 
Join Date: Oct 2007
Posts: 5
dmb2140 is on a distinguished road

Need some advice for my program


I don't have to tell you I'm a nub if i'm asking you this question. I'm writting a program, which I will include later, and I'm having trouble figuring out my next direction. I program is a fireworks stand and i have to buy inventory for it. Later I will have to set the program up to sell it to people, this will be similar to the game "lemonade stand."

Right now I need some help figuring out my next direction. I have the program set up where there are 2 selections and under those I have sub selections, with the pricing of the what each thing cost. I'm given 500 dolars to work with to buy my inventory. I just need some advice in what direction to go with next. Do need to work with a "pass by reference" or use "switch statements" or both?

Here is what I have so far, it works
I'm using Dev C++

Format is cpp
the file is cpp

CPP / C++ / C Code:
#include <iostream>
#include <windows.h>

using namespace std;

int main()
{
    
    
    
    int select = 0;
    HANDLE hConsole;
    hConsole = GetStdHandle(STD_OUTPUT_HANDLE);

    SetConsoleTextAttribute(hConsole, 10);
    cout << "JB's Fireworks Stand " << endl;
   
    
    

/*while (select != 1)*/
while (select ==0)
{
    cout << "Please select materials needed for your stand " << endl;
    cout << " Money\t $500.00 " << endl;  
    cout << endl;
    cout << " 1. Artillery Shells " << endl;
    cout << " 2. Black Cats " << endl;
    cout << endl;
    cout << "Selected Choice: ";
    cin >> select; 
       

    if (select == 1)
    {
        cout << endl;       
        cout << "Please Select Material " << endl;
        cout << endl;
        cout << "\t Material \t\t\t Price  " << endl;     
        cout << " 1. 500 Boxes of Artillery Shells \t 50.00 " << endl;
        cout << " 2. 1000 Boxes of Artillery Shells \t 95.00 " << endl;
        cout << " 3. 2000 Boxes of Artillery Shells \t 150.00 " << endl;
        cout << " 0 to exit " << endl;
        cout << "Selected Choice ";
        cin >> select;
}
     
    if (select == 2)
    {
        cout << endl;       
        cout << "Please Select Material " << endl;
        cout << endl;
        cout << "\t Material \t\t Price  " << endl;     
        cout << " 1. 500 Boxes of Black Cats \t 45.00 " << endl;
        cout << " 2. 1000 Boxes of Black Cats \t 99.00 " << endl;
        cout << " 3. 2000 Boxes of Black Cats \t 189.00 " << endl;
        cout << " 0 to exit " << endl;
        cout << "Selected Choice ";
        cin >> select;
        }
        

}/*End Loop*/

 system("pause");
 return 0;
} 

//C++, CPP
Last edited by LuciWiz : 04-Dec-2007 at 11:44. Reason: Please insert your C/C++ code between [cpp] & [/cpp] tags
  #2  
Old 03-Dec-2007, 22:28
WaltP's Avatar
WaltP WaltP is offline
Outstanding Member
 
Join Date: Feb 2004
Location: Midwest US
Posts: 3,234
WaltP is a name known to allWaltP is a name known to allWaltP is a name known to allWaltP is a name known to allWaltP is a name known to allWaltP is a name known to all

Re: Need some advice for my program


Quote:
Originally Posted by dmb2140
I don't have to tell you I'm a nub if i'm asking you this question.
Of course you're a nub. Only nubs never read the Guidelines even when they have been asked to after 2 out of 3 posts, and ALL 3 posts had to be edited to add CODE tags -- with a request to use them. Now the 4th post and still no CODE tags, no Guidelines. Why should we bother?
__________________

Cow: You're a lawyer too?
Mooseblood (mosquito): Ma'am, I was already a bloodsucking parasite. All I needed was a briefcase!
  #3  
Old 04-Dec-2007, 15:18
dmb2140 dmb2140 is offline
New Member
 
Join Date: Oct 2007
Posts: 5
dmb2140 is on a distinguished road

Re: Need some advice for my program


I'm sorry, I forgot to put [cpp] on my cpp.
 
 

Recent GIDBlog2nd Week of IA Training by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Two-Tier data dissemination code installation problem nidhibansal1984 Computer Software Forum - Linux 6 16-Sep-2007 10:13
Text-Based Roulette Game mfm1983 CPP / C++ Forum 5 29-Nov-2006 12:20
BOOKEEPING program, HELP!! yabud C Programming Language 10 17-Nov-2006 03:48
Pipeline freeze simulation darklightred CPP / C++ Forum 6 27-Jul-2006 19:37
How to read particular memory location ? realnapster C Programming Language 10 10-May-2006 09:11

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 04:16.


vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.