Oh that's right thanks guys. How do I not make the variables global and how will that help me?
Type: Posts; User: CXHatchback
Oh that's right thanks guys. How do I not make the variables global and how will that help me?
The return values I keep getting are 4250916, can't figure out why.
#include <stdio.h>
float myarray[10] = {1.66,.58,-2.35,0,1.9,0,-.34,0,7.56,-.3};
int...
haha yeah I just figured that out thanks a lot
I tried using 11 instead of 10 in case it needed room for the null character (forgot how that works) but that didn't help any.
I'm trying to initialize an array with 10 floating point numbers in it. This would be the only way I know how. Please advise :)
float array[10] = (1.66,.58,-2.35,0,1.9,0,-.34,0,7.56,-.3);
I think that helped, but I'm having trouble figuring out where that would go and what I need to delete. Would it be possible to explain that a bit more? TIA
I'm supposed to be using enumeration to print a list of the months, and next to each month, the month that comes before it. Problem is the teacher didn't cover it too much, and the book we use, which...
Thanks a lot guys, I changed it to float and also initialized the variables in each function and it works!
I was given the function definition by my teacher, so I was initially using integer. Kind...
I'm workign on the last part of this problem and I'm supposed to be finding a product of the non-zero numbers in the array. I'm getting a very large negative number.
// Homework 4 Problem 4
...
well I changed the array sizes to 7x3 and it worked perfectly, thanks.
Damn that gets hairy after 1D
You know? I think you're right, lol.
ok I got the sum function working, but the minimum function doesn't seem to be doing what i'm asking it to. I've double checked it and it looks fine, but i keep getting a 0.
#include...
Nice write-up, thanks. Now I know why she gave us:
int addition (int matrix[][MAXCOL], int row, int col);
haha yeah that would be scary. I always thought it was wierd that a computer class was not taught in a computer lab, but this semester wasn't that bad. My teacher also has a very thick accent. It is...
Wow thanks that really helped a lot. The major problem I'm having is that my teacher gave us the function prototypes but I don't understand them. There's too many variables listed in the parameter...
That's what I meant. Any idea on the task at hand?
I keep getting an error that says illegal implicit conversion from 'int' to 'int [10]' and I have no idea what that means
The program stops where i try to call the addition function from the main
Thanks I'll delete that semicolon.
I know that the array has 100 cells, that's how I'm supposed to be doing it for my work. But my teacher didn't specify that she wanted the program to have code...
I'm trying to sum the elements in a 2D array but I keep getting errors. and I can't figure out what it is. Help would be appreciated, Thanks.
#include <stdio.h>
#define MAXROW 10
#define...