Search:

Type: Posts; User: xclarkiex5x

Search: Search took 0.01 seconds.

  1. Replies
    6
    Views
    813

    stcuk in loop

    why is my program stuck in the last while loop? compile this code.. then enter 3,4,5 for a,b,c and then enter "y'' for your choice to continue... it continues to loop forever


    #include...
  2. Replies
    27
    Views
    2,372

    so now onto the part with adding the numbers...

    so now onto the part with adding the numbers together.... i know i have to use infile >> variable... but how to order it from there confuses me...
  3. Replies
    27
    Views
    2,372

    ok yah programing is somewhat new to me so its...

    ok yah programing is somewhat new to me so its gonna take me a while to get some of the things your trying to say
  4. Replies
    27
    Views
    2,372

    what would you suggest instead of infile.eof()?

    what would you suggest instead of infile.eof()?
  5. Replies
    27
    Views
    2,372

    hmm it gives me the correct amount of numbers in...

    hmm it gives me the correct amount of numbers in the file whenever i change the input file for the count program
  6. Replies
    27
    Views
    2,372

    youll be happy to know that i got the count...

    youll be happy to know that i got the count program working without a hitch.. i used
    (!infile.eof()) for the while statement. now just to modify that to make it work for the sum of numbers instead...
  7. Replies
    27
    Views
    2,372

    so ill need more variables maybe? and have a sum...

    so ill need more variables maybe?
    and have a sum somewhere.
  8. Replies
    27
    Views
    2,372

    ok and you were correct with your sum of the...

    ok and you were correct with your sum of the numbers instead of my count of the numbers
    which means ill probably have to change the program
  9. Replies
    27
    Views
    2,372

    infile is a file stream so is outfile... i think

    infile is a file stream so is outfile... i think
  10. Replies
    27
    Views
    2,372

    honestly i just saw something in my textbook that...

    honestly i just saw something in my textbook that looked better than what i had.... im totally in the dark right now and just need somewhere to go.... i know that i want the while loop to say... ...
  11. Replies
    27
    Views
    2,372

    so what should the condition be

    so what should the condition be
  12. Replies
    27
    Views
    2,372

    i can get my code to write to the file but it...

    i can get my code to write to the file but it doesnt keep an accurate count.. i keep getting trash values such as: 536870912 Depending on what i have in the input file it changes but its always a...
  13. Replies
    27
    Views
    2,372

    umm im not really sure. i know i need to count...

    umm im not really sure. i know i need to count the amount of numbers. so count++ in the while loop should be enough, im just really confused as to what condition i would use to make the while loop...
  14. Replies
    27
    Views
    2,372

    so how would i change it so that it only counts...

    so how would i change it so that it only counts once.. also no matter how many numbers are in the file (say theres 42) i always get 1 as count.. how would i make the while condition work to count the...
  15. Replies
    27
    Views
    2,372

    changed a few things just now // // // // ...

    changed a few things just now

    //
    //
    //
    //

    #include <iostream.h>
    #include <fstream.h>
    #include <ios.h>
  16. Replies
    27
    Views
    2,372

    help me with files

    My program needs to do the following things

    Asks the user of the name of the input file
    If the user types an incorrect file name (a file name that does not exists in that directory), your code...
  17. int c,cpl,pn,sd,vb; cout

    int c,cpl,pn,sd,vb;

    cout << "\n1) Print the alphabet using a specified number of characters per line.";
    cout << "\n2) Check to see if a number is prime.";
    cout << "\n3) Get the sum of the...
  18. i dont even know where to start.. i just need...

    i dont even know where to start.. i just need something to go from. i dont want my assignment done for me i just need a starting point
  19. displaying characters per line and checking prime numbers

    so i have a project for my class that has to have the user specify how many characters per line they want the alphabet to be displayed (1-26). thats where im lost. then the second part is that i have...
  20. Thread: need help

    by xclarkiex5x
    Replies
    17
    Views
    2,312

    ok so ive been working on this project for about...

    ok so ive been working on this project for about 3 days now and i still have a few problems. 1. capitals don't work. 2. i have no idea how to make remainder work because it wont work with double. 3....
  21. Thread: need help

    by xclarkiex5x
    Replies
    17
    Views
    2,312

    i used hk_mp5kpdw's solution but now if i type...

    i used hk_mp5kpdw's solution but now if i type the full word "add" instead of just "a" the program terminates.... and i also cant use this solution for the remainder because i cant used double. only...
  22. Thread: need help

    by xclarkiex5x
    Replies
    17
    Views
    2,312

    stuck in mounds of if statements please help. i...

    stuck in mounds of if statements please help. i cant seem to figure out how to make the program get past my first if statement

    #include <iostream>
    using namespace std;
    void main () {
    double...
  23. Thread: need help

    by xclarkiex5x
    Replies
    17
    Views
    2,312

    #include using namespace std; void...

    #include <iostream>
    using namespace std;
    void main () {
    double x,y;
    cout << "Give me a number: ";
    cin >> x;
    cout << "Give me another number: ";
    cin >> y;
    if (y==0)
    cout << "Start...
  24. Thread: need help

    by xclarkiex5x
    Replies
    17
    Views
    2,312

    need help

    program needs to be able to take 2 different numbers that part i know. then it has to output What do you want to do? i know i just use "cout <<" for that. the part of the project where i am confused...
Results 1 to 24 of 24