Search:

Type: Posts; User: faxtoaster

Search: Search took 0.01 seconds.

  1. Thread: arrays

    by faxtoaster
    Replies
    32
    Views
    3,268

    ah :) haha, got it. thanks.

    ah :) haha, got it. thanks.
  2. Thread: arrays

    by faxtoaster
    Replies
    32
    Views
    3,268

    This code still generates that error about...

    This code still generates that error about memory. Is there a problem with my variables or something that could be causing this? In my program I've used the two functions as header files (its the...
  3. Thread: arrays

    by faxtoaster
    Replies
    32
    Views
    3,268

    I am getting a bug somewhere. The debugger...

    I am getting a bug somewhere. The debugger doesn't find it but my program isn't running right. It does the first part asking for the arrays, is my problem somewhere in this function? I'm getting...
  4. Thread: arrays

    by faxtoaster
    Replies
    32
    Views
    3,268

    thats what i don't understand how to do. i don't...

    thats what i don't understand how to do. i don't know how to assign numbers from one array to another array. i understand what i want to do, but i just can't figure out how to implement it.
  5. Thread: arrays

    by faxtoaster
    Replies
    32
    Views
    3,268

    splitting an array into 2 arrays

    In one program I am working on, I ask the user to input an array. I then use that array into a function which creates 2 separate arrays, one with numbers divisible by 3, and the other with all other...
  6. Thread: arrays

    by faxtoaster
    Replies
    32
    Views
    3,268

    nevermind!

    thanks for the help guys, i figured out my problem. i needed to reset fSum to zero in my first nested loop, otherwise my numbers kept growing and not resetting. Thanks for the help, feels so good...
  7. Thread: arrays

    by faxtoaster
    Replies
    32
    Views
    3,268

    This givese me the correct values while p = 0,...

    This givese me the correct values while p = 0, but for p = 1, and p=2, they are all messed up. whats wrong with this? i fixed my variables, they are no longer declared in the loops




    for...
  8. Thread: arrays

    by faxtoaster
    Replies
    32
    Views
    3,268

    why is my output huge negative numbers?

    my output using this part of my code gives me huge negative numbers. i'm mixed up as to where my print statement should be in these for loops. am i way off here?




    for (p=0; p<Row; p++)
    { ...
  9. Thread: arrays

    by faxtoaster
    Replies
    32
    Views
    3,268

    next problem

    thanks for the help guys. i figured out how to do that last program, and i even made it look slightly aesthetic. i have another problem though. i'm doing a program that asks the user to imput...
  10. Thread: arrays

    by faxtoaster
    Replies
    32
    Views
    3,268

    my book uses enums i promise. i changed it to...

    my book uses enums i promise. i changed it to define though. the problem with my book is it doesn't say anything about initializing an array with values the user inputs. i just don't get how else...
  11. Thread: arrays

    by faxtoaster
    Replies
    32
    Views
    3,268

    i'm new at this

    to answer your question i'm learning c by myself in a self paced course. so i'm having a hard time learning this by myself. my book uses enum {} instead of define for arrays, although it mentions...
  12. Thread: arrays

    by faxtoaster
    Replies
    32
    Views
    3,268

    i need to pass my array into another function and...

    i need to pass my array into another function and modify it so that it prints out a modified array where every value is multiplied by 2. so far i have this. but i haven't started multiplying the...
  13. Thread: arrays

    by faxtoaster
    Replies
    32
    Views
    3,268

    arrays

    how do i print out the values of an array as output? i can only figure out how to put one value of an array as output, but not the whole string.
  14. Replies
    5
    Views
    1,063

    thanks for all the help guys, i got it working,...

    thanks for all the help guys, i got it working, as usual it was a simple mistake i was making.
  15. Replies
    5
    Views
    1,063

    This is what I've tried. My only variable is...

    This is what I've tried. My only variable is fVal, and if I entered 5 for fVal when running the program i get this. fVal = 10, fVal = 30, fVal = 120. But it should be 10, 15, 20. See what I mean?...
  16. Replies
    5
    Views
    1,063

    function problems

    I need to write a program where i write a function to ask a user to input a number, then i need to write 3 other functions one multiplying it by 2, the other multiplying it by 3 and the other...
  17. Replies
    3
    Views
    1,708

    Thanks everybody, i got it working!

    Thanks everybody, i got it working!
  18. Replies
    2
    Views
    1,724

    thanks for the help, i'll see if that works. ...

    thanks for the help, i'll see if that works. sorry for spamming the board i'm new at this.
  19. Replies
    2
    Views
    1,724

    i can't fix it! its driving me nuts

    This is supposed to compute iMax^3 + iMax-1^3 + iMax-2^3...1^3
    Instead, it doesn't :). How can i add up the terms in my for loop? It is setup so it only adds iMax^3 and iMax-1^3, but i don't know...
  20. Replies
    3
    Views
    1,708

    still confused

    i know that i should be using a function, but i can't figure out the loop. i have it set up like this:

    for(iNumber =1; iNumber<iMax; iNumber++)
    iAns: pow(iMax,3) + pow(iNumber,3);
    ...
  21. Replies
    3
    Views
    1,708

    Calculating Sums

    I need to calculate a sum of cubes in one of my programs, but have no idea how to get started. I started using a For loop but have had lots of trouble getting results. I am asking the user to put...
Results 1 to 21 of 21