Search:

Type: Posts; User: skmightymouse

Page 1 of 2 1 2

Search: Search took 0.02 seconds.

  1. Replies
    7
    Views
    1,380

    Sorry, I forgot to mention that I did the same...

    Sorry, I forgot to mention that I did the same thing with the sqrt() function. Yes this works and I calculated on my calculator to make sure:


    hold[i] = (int) pow(((double)hold[i] - average),2);...
  2. Replies
    7
    Views
    1,380

    I actually was able to figure it out If I...

    I actually was able to figure it out

    If I caste the pow as an int and then the hold[i] as a double it works perfect.

    Thanks anyways
  3. Replies
    7
    Views
    1,380

    I do have that declaration I just didn't include...

    I do have that declaration I just didn't include it in the code I pasted
  4. Replies
    7
    Views
    1,380

    Error Using Math Functions

    I am trying to get the standard deviations in my array and the funtions pow() and sqrt() won't work because "error more than one instance of overloaded function pow". Same error with the sqrt.
    ...
  5. Replies
    4
    Views
    1,356

    Thanks Zuk! Perfect

    Thanks Zuk! Perfect
  6. Replies
    4
    Views
    1,356

    atoi problems

    I am trying to pass an array that has tokenized strings converted to integers in them.

    I printed out what the array contains in the first function (str_length) but when I pass the array to the...
  7. Replies
    2
    Views
    2,280

    Sorry, that is a lot to take in at once. I am...

    Sorry, that is a lot to take in at once. I am just going to start by addressing the dynamic array of pointers to char using malloc.

    Would the code look similar to this: array = malloc(81 *...
  8. Replies
    2
    Views
    2,280

    Storing Multiple Strings

    How would I store multiple strings that a user inputs? Also the user can enter as many strings as he wants until he enters an empty string ("str[0] == '\0').

    I am guessing I would want to store...
  9. Replies
    6
    Views
    9,894

    Worked like a charm, thank you

    Worked like a charm, thank you
  10. Replies
    6
    Views
    9,894

    Ok so I did what you said but now the loop only...

    Ok so I did what you said but now the loop only goes through twice and then ends.
  11. Replies
    6
    Views
    9,894

    1. I know that the loop won't terminate if there...

    1. I know that the loop won't terminate if there is at least one character thats why if the program asks them to input values for the string and they don't enter any values shouldn't the loop...
  12. Replies
    6
    Views
    9,894

    End Loop When Empty String is Inputted

    I am trying to write a program that will store stings until the user enters an empty string.

    Here's the code of what I have so far. I am guessing that I need to change the statement at the end of...
  13. Replies
    3
    Views
    6,641

    I have to do my own sorting. If anybody knows...

    I have to do my own sorting.

    If anybody knows how I can fix the existing code I have that would be great
  14. Replies
    3
    Views
    6,641

    Median and Mode of an Array

    I am trying to write a program that will find the meadian and mode of the values in an array.

    This is the code I have so far for Median:



    void median (double array[], int numItems)
    {
    ...
  15. Replies
    6
    Views
    6,816

    I think that you were trying to over complicate...

    I think that you were trying to over complicate it because I was able to write it like this without any parallel arrays or structs:



    int i = 0, j, n;
    double sum = 0, variance;

    n...
  16. Replies
    6
    Views
    6,816

    I'm pretty new to coding so I am currently...

    I'm pretty new to coding so I am currently scouring the internet to figure out what a parallel array is and how to use one. I don't think I want to do a struct of the original array though.
  17. Replies
    6
    Views
    6,816

    For step 2 would I want to create another array...

    For step 2 would I want to create another array just to store the deviation calculations?
  18. Replies
    6
    Views
    6,816

    Standard Deviation in C

    I'm trying to write program that calculates the standard deviation of the numbers in an array.

    I was looking at other posts on this site trying to figure it out and I came across this one where...
  19. Replies
    16
    Views
    21,063

    Thank you so much, this has been extremely...

    Thank you so much, this has been extremely helpful. Smokeyangel was completely right and thanks Adak for explaining it very well for me. It runs perfect now!
  20. Replies
    16
    Views
    21,063

    Sorry I'm not trying to be that guy that doesn't...

    Sorry I'm not trying to be that guy that doesn't google and research stuff before posting but I searched latter and I didn't get any valid results so I just thought that you might have misspelled it...
  21. Replies
    16
    Views
    21,063

    It's the latter? I'm not sure if I know what...

    It's the latter? I'm not sure if I know what that means.
  22. Replies
    16
    Views
    21,063

    Ok this is what I have so far, let me know if I'm...

    Ok this is what I have so far, let me know if I'm heading in the right direction at all:



    #include <stdio.h>
    #include <stdlib.h>
    #define FILENAME "C:/mydata.txt"

    int read_file (FILE *ifp);
  23. Replies
    16
    Views
    21,063

    Ya my array has the possibility to hold up to...

    Ya my array has the possibility to hold up to 1500 values are there aren't always going to be that many values so I need it to adapt. Sorry I would have said something if I knew that the approach...
  24. Replies
    16
    Views
    21,063

    It is just a file that contains values like this:...

    It is just a file that contains values like this:

    55
    336
    56
    886
    112
    20

    Like that and then stores those values to an array
  25. Replies
    16
    Views
    21,063

    I think I plan to read them in as ints. Can...

    I think I plan to read them in as ints.

    Can you give me an example of how I would write code to do that?
Results 1 to 25 of 49
Page 1 of 2 1 2