Search:

Type: Posts; User: liquidcourage1

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    20
    Views
    2,863

    This code is nice and clean. It makes perfect...

    This code is nice and clean. It makes perfect sense, but when I compile it, (using old Visual C++ 6.0 BTW) it only prints this:


    Welcome to the election gizmo (this is in main)

    press any key...
  2. Replies
    20
    Views
    2,863

    Ok... assuming I change all the 'void's to...

    Ok... assuming I change all the 'void's to 'int'...
    then at the end of the code... how do I return the value(total of EACH district) to main and then figure out overall winner?

    I'm a little slow...
  3. Replies
    20
    Views
    2,863

    So would this piece of code go in "main" or...

    So would this piece of code go in "main" or imbedded within my function?
  4. Replies
    20
    Views
    2,863

    I've just revised this... I did have redundant...

    I've just revised this... I did have redundant code. I didn't realize how functions worked. I was trying for District 1, 2... whatever...

    anyway, I've eliminated one of them and created 1...
  5. Replies
    20
    Views
    2,863

    Update: #include using...

    Update:


    #include <iostream>

    using namespace std;

    void district1(); //Need prototypes
    void district2();
  6. Replies
    20
    Views
    2,863

    Making more sense now. I appreciate the help. ...

    Making more sense now. I appreciate the help. And don't think I was mad. I guess it's hard to read tone through letters and numbers.
  7. Replies
    20
    Views
    2,863

    I am a beginner after all. Do you really think...

    I am a beginner after all. Do you really think I'd be on the boards if I were GOOD at this?

    But seriously, I am new to functions and I see where the second part of your argument makes sense. ...
  8. Replies
    20
    Views
    2,863

    Long story short, it gets through the 10th voter...

    Long story short, it gets through the 10th voter and stops... it should reset to District 2 and start again with voter 1. I'll take voter #11, but having it start at 1 again for District 2 would be...
  9. Replies
    20
    Views
    2,863

    Stuck in a loop

    I'm trying to write a code that runs through 2 different districts with 10 voters each. They must vote in order and it must start with district 1.

    The goal is to get through all of this and report...
  10. Replies
    13
    Views
    2,049

    I need to redo this program before finals... I...

    I need to redo this program before finals... I need to correct some things to get extra credit. It opens a file named "credit.txt" . In the code I placed it in the d: drive. So if you want to run...
  11. Replies
    13
    Views
    2,049

    Ok. That makes sense. I appreciate it.

    Ok. That makes sense. I appreciate it.
  12. Replies
    13
    Views
    2,049

    //This program is a telemarketing program that...

    //This program is a telemarketing program that assists
    //the telemarketer by determining interest rate for each customer based on
    //preferred status and will collect data if they accept card
    ...
  13. Replies
    13
    Views
    2,049

    Awesome. That works pretty well. The little...

    Awesome. That works pretty well. The little tutorial page you included saved my butt. However, my program terminates after I enter the information. I need it to go to the next line in the program...
  14. Replies
    13
    Views
    2,049

    CHANGED //This program is a telemarketing...

    CHANGED



    //This program is a telemarketing program that assists
    //the telemarketer by determining interest rate for each customer based on
    //preferred status and will collect data if they...
  15. Replies
    13
    Views
    2,049

    I've now included: while(!inFile.eof()) {...

    I've now included:


    while(!inFile.eof())
    {
    }
    but I don't know if the rest of the code is embedded within this?
  16. Replies
    13
    Views
    2,049

    I don't think that's a problem with the way this...

    I don't think that's a problem with the way this assignment is worded.
  17. Replies
    12
    Views
    1,235

    seems to be easier, because you type less. But...

    seems to be easier, because you type less. But in the end, I think it's whatever you're comfortable with.
  18. Replies
    13
    Views
    2,049

    New code so far: //This program is a...

    New code so far:
    //This program is a telemarketing program that assists
    //the telemarketer by determining interest rate for each customer based on
    //preferred status and will collect data if they...
  19. Replies
    13
    Views
    2,049

    You're right, but this is suppose to be a very...

    You're right, but this is suppose to be a very simple list of names and status. We haven't used std::string yet. So I don't want to use something I don't fully understand just yet.

    So far:...
  20. Replies
    13
    Views
    2,049

    Menu driven code

    Need help reading data from a file that looks like this:

    X Joe Scholtz 437-4798
    A Tim Wade 768-7658
    X Sara Jobs 326-7857
    ! Jaynce Bee 354-8678

    This file may be longer than this or shorter...
  21. Replies
    9
    Views
    1,617

    Here's what jlharrison and I have come up with...

    Here's what jlharrison and I have come up with (Thanks J!).


    #include <iostream>
    using namespace std;

    int main()
    {
    int days, average;
    double totalScores = 0, tempScore=0;
  22. Replies
    9
    Views
    1,617

    Update

    I've gotten out of the loop, but I still can't figure out how to label the Temperature so that it begins at "Temperature 1" instead of some random number.

    It's also taking the form of whatever...
  23. Replies
    9
    Views
    1,617

    Ok... I'm getting the temp to read temp2 instead...

    Ok... I'm getting the temp to read temp2 instead of Temp 1 (that's how it should start anyway). And I'm stuck in a loop.
  24. Replies
    9
    Views
    1,617

    That's the idea. So could it look something like...

    That's the idea. So could it look something like this?


    {
    int days=7;
    int temp;
    int total; //accumulator for temps
    double average;

    {
  25. Replies
    9
    Views
    1,617

    Accumulator and Temperature

    Ok. I have to write a code that averages temperatures over a 7 day period. I have to write it with the for, while, and do while loops. I've just started loops and I'm a little confused.

    I think...
Results 1 to 25 of 38
Page 1 of 2 1 2