Search:

Type: Posts; User: dispatch4599

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. (\n)

    (\n)
  2. I was trying to count the number of integers read...

    I was trying to count the number of integers read AND the number of times looped because I only want the first two lines. I am at work right now but will try all suggestions when I get home.
  3. I'm not getting the answer that it should be. ...

    I'm not getting the answer that it should be. The output should be 266.888. The output I am receiving is 193.333. There are NO compiler errors. There are 4 lines of integers and I only want to...
  4. Averaging just 2 lines of file of integers

    Again, I am stuck! (last part of my program, thank god) I need to read just two lines of my file of integers. I thought the following code would work, however, I am once again wrong and at a loss. ...
  5. Replies
    31
    Views
    2,914

    Ahh, got ya. Thank you all for your help with...

    Ahh, got ya. Thank you all for your help with that. Sorry to be such a nuisance. This is all new to me and I am trying very hard to understand everything. Sometimes it is difficult for me to...
  6. Replies
    31
    Views
    2,914

    When I checked my output it equaled the amount I...

    When I checked my output it equaled the amount I got from using the calculator. Hell, at this point, I'm just happy to have it do that..
  7. Replies
    31
    Views
    2,914

    Ok here is what worked and it is in the professor...

    Ok here is what worked and it is in the professor guidelines..




    sum = 0;
    under = true;


    while (under)
  8. Replies
    31
    Views
    2,914

    LOL. I just looked at the assignment sheet and...

    LOL. I just looked at the assignment sheet and it says to use a flag controlled loop structure.. So much for that... lol. I can't wait till we get more freedom with our coding... <sigh>
  9. Replies
    31
    Views
    2,914

    Probably because it's not been taught yet to use...

    Probably because it's not been taught yet to use it, although I don't know for sure. Vart helped me the other night and he saw the <break> in the program and said that I needed to do it again. ...
  10. Replies
    31
    Views
    2,914

    DUDE relax. I can't change it when I'm at work. ...

    DUDE relax. I can't change it when I'm at work. When I get home this evening it will be done.
    I also apologize that my professor has rules for us. I'm not a brick wall, I do listen and each...
  11. Replies
    31
    Views
    2,914

    Not allowed to use breaks.

    Not allowed to use breaks.
  12. Replies
    31
    Views
    2,914

    Tried to get rid of it but the program would just...

    Tried to get rid of it but the program would just stop and not continue... so it works the way it is, thats the way Im going to leave it for now. LOL

    This is how the professor requested it. ...
  13. Replies
    31
    Views
    2,914

    and yes I see that I forgot to read from file... ...

    and yes I see that I forgot to read from file...

    I think that I need to take a break from this stuff at night... ughhhhhh
  14. Replies
    31
    Views
    2,914

    I am soooo confused... Ok, Im going to post the...

    I am soooo confused... Ok, Im going to post the whole program..... maybe this will clear things up..



    #include<iostream>
    #include<fstream>
    #include<iomanip>
    #include<cmath>

    using...
  15. Replies
    31
    Views
    2,914

    I'm absolutely sure. This is part 7 of the...

    I'm absolutely sure. This is part 7 of the program with me using the infile for all of the solutions.
  16. Replies
    31
    Views
    2,914

    Actually, I'm not adding the same number to sum...

    Actually, I'm not adding the same number to sum over and over. It pulls in the next number from the file. I know that the answer is going to be something I could kick myself for as that has been...
  17. Replies
    31
    Views
    2,914

    inFile.open ("K:\\DATFILE1.TXT"); if (...

    inFile.open ("K:\\DATFILE1.TXT");

    if ( !inFile )
    {
    cout<< "**Can't open input file**" <<endl;
    return 1;
    }

    sum = 0;
    under = true;
  18. Replies
    31
    Views
    2,914

    What am I doing wrong?

    Here is just the while loop. The object is to add the integers in the file until the sum < = 1000.




    sum = 0;
    under = true;

    while (inFile && under)
  19. Replies
    16
    Views
    3,716

    We were required to use float. You guys are the...

    We were required to use float. You guys are the greatest. I changed just a few things to get it to look like what I have actually learned but nonetheless, thank you so much. Now I get to move on to...
  20. Replies
    16
    Views
    3,716

    you are correct. I apologize. Now can someone...

    you are correct. I apologize. Now can someone explain to me what the float num, sum=0.f means.. mainly the 0.f? I have never seen this used before.
  21. Replies
    16
    Views
    3,716

    I think his code is correct, it states greater...

    I think his code is correct, it states greater than or equal to 13 to stop running.

    ok maybe I'm just too tired.. <sigh>
  22. Replies
    16
    Views
    3,716

    Whoa... that is way beyond what I have been...

    Whoa... that is way beyond what I have been instructed so far. I'm just a beginner here. LOL. There is alot here I don't know the meaning to. Take it back to wayyyy basic. I would like to...
  23. Replies
    16
    Views
    3,716

    Riddle me this... when I manually put my first 12...

    Riddle me this... when I manually put my first 12 integers into a calculator I get an average of 340.083. Even when I use your code, I get an average of 313.923. Ughh.. this is going to be the...
  24. Sorry, I'm not more knowledgeable on this stuff...

    Sorry, I'm not more knowledgeable on this stuff like the end of file stuff. Right now I don't use that and just insert the file name to read just from the file.



    while (liscense)
    {
    ...
  25. As a newbie myself, I would check and make sure...

    As a newbie myself, I would check and make sure that your file path is correct. I've used the wrong file path a million times. For example is your text file on ("F:\\regfile.txt")?

    Try adding...
Results 1 to 25 of 40
Page 1 of 2 1 2