Search:

Type: Posts; User: iGuardian

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    2
    Views
    1,375

    Is what i've written even remotely close to what...

    Is what i've written even remotely close to what I need it to do?

    Write a C++ programthat will do the following:

    1. Read data from the keyboard in the form
    vitamin price quantity
    2. Call a...
  2. Replies
    2
    Views
    1,375

    Basic Array question

    For some reason when I run the program I output hexidecimals. Can anyone help me with this and point me in the right direction?
    #include <iostream>#include <cstdlib>
    #include <fstream>
    #include...
  3. Replies
    2
    Views
    1,041

    I don't quite understand where I am messing up in...

    I don't quite understand where I am messing up in this program. It is outputting 1 and I can't figure out why. Can anyone point me in the right direction?




    #include <fstream>
    #include...
  4. Replies
    2
    Views
    1,041

    Standard Deviaiton issue

    I have been working on this for a few days now and I still can't wrap my head around arrays and filling in arrays to compute the Standard Deviation of an input file.

    This is what I have:

    ...
  5. Replies
    0
    Views
    764

    Array problems

    I am having a hard time understanding how to establish arrays for this problem. We're supposed to write a program that reads in numbers from 2 different files, and it averages one of the files while...
  6. Replies
    4
    Views
    1,277

    Ok, That makes sense, I was once again making it...

    Ok, That makes sense, I was once again making it harder than it should have been. When dealing with files do you suggest I only declare one variable rather than declaring many as I did before.
  7. Replies
    4
    Views
    1,277

    C++ File Question

    In this program I have to write a program that has to take the inputs of a file and output the average of the sum of numbers. My question is regarding how to average the numbers by adding the total...
  8. Replies
    19
    Views
    3,203

    I assume I made the same mistake as before. Is...

    I assume I made the same mistake as before. Is this in the right direction?

    #include <iostream>


    using namespace std;


    int fib ( int n );
    // Function reference.
  9. Replies
    19
    Views
    3,203

    I'm following along the tutorial while i attempt...

    I'm following along the tutorial while i attempt to do it. Is this correct so far provided what you showed me

    #include <iostream>

    using namespace std;


    // Recursion will be used for this...
  10. Replies
    19
    Views
    3,203

    I apologize, I'm only 8 weeks into the course so...

    I apologize, I'm only 8 weeks into the course so I may come off more dumb than I really am, C++ isn't coming to me as easy as i thought
  11. Replies
    19
    Views
    3,203

    So after looking at some recursion tuts, can this...

    So after looking at some recursion tuts, can this be used for recursion, as dumb of a question as it may be.
  12. Replies
    19
    Views
    3,203

    so in this case, the function would look like ...

    so in this case, the function would look like

    int fib ( int n ){
    int fib = 0;
    int fib1 = 0;
    int fib2 = 1;


    fib = fib1 + fib2;
    fib1 = fib2;
  13. Replies
    19
    Views
    3,203

    I realize it has to do with but my question...

    I realize it has to do with

    but my question is how would I go about setting it to add all numbers that can be modded by 3 and or 5 that are less then 4 million.
  14. Replies
    19
    Views
    3,203

    Not yet, we are getting to it in 2 chapters

    Not yet, we are getting to it in 2 chapters
  15. Replies
    19
    Views
    3,203

    Fibonacci Sequence

    It compiles properly but when I run the program it is a blank screen. Is it because i do not call int fib( int n )?
    "Edit"
    I realize it's timing out now, I just do not understand why.

    #include...
  16. Replies
    4
    Views
    972

    The reason why I use that is so i don't get an...

    The reason why I use that is so i don't get an output of say, 3:60 AM
  17. Replies
    4
    Views
    972

    Problem with a program

    My question for this is regarding a time computation error I am having. Rather than outputting AM or PM, regardless of what I input, I get AM. Is it the if/ else statement or should I use a for...
  18. Replies
    4
    Views
    1,160

    #include using namespace std; ...

    #include <iostream>

    using namespace std;

    void get_input ( double &inches, double &feet );

    void give_output( double centimeters, double meters );

    int main ()
    {
  19. Replies
    4
    Views
    1,160

    Problem with function

    Question regarding the response issue. I am having the user input 1 in order to calculate for meters/centimeters and 2 for inches and feet. It has to be an if/else statement, but whenever I run it,...
  20. Replies
    5
    Views
    1,444

    Thanks for the feedback!

    Thanks for the feedback!
  21. Replies
    5
    Views
    1,444

    Ok, this is my new code. Any suggestions? ...

    Ok, this is my new code. Any suggestions?


    #include <iostream>#include <cmath>


    using namespace std;


    double basal_rate ( int weight_par, int calories );
  22. Replies
    5
    Views
    1,444

    More complex Function

    Ok, My question for this one is a bit more complicated. What I am trying to do is to get the program to first calculate the Basal Metabolic Rate, then the amount of calories needed to maintain the...
  23. Thread: Function

    by iGuardian
    Replies
    23
    Views
    2,370

    If I were to change "int" to say float or double,...

    If I were to change "int" to say float or double, would that make it better. The while loop is to prompt a response, y-yes, i fixed the upper/lower case.
  24. Thread: Function

    by iGuardian
    Replies
    23
    Views
    2,370

    Function

    The file compiles correct, I just want to make sure i assigned the function and variables correctly because when i run the program, the output is always 0 reguardless of the inputted numbers.

    ...
  25. Thank you very much for your time and patience,...

    Thank you very much for your time and patience, I'll start working on it more.
Results 1 to 25 of 30
Page 1 of 2 1 2