ah :) haha, got it. thanks.
Type: Posts; User: faxtoaster
ah :) haha, got it. thanks.
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...
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...
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.
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...
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...
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...
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++)
{ ...
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...
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...
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...
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...
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.
thanks for all the help guys, i got it working, as usual it was a simple mistake i was making.
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?...
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...
Thanks everybody, i got it working!
thanks for the help, i'll see if that works. sorry for spamming the board i'm new at this.
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...
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);
...
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...