Why, do you want to close this thread?
[edit]Your urgency is not ours. Spamming the boards will decrease the likelihood of a reasonable response. Bumping threads ain't gonna help ya neither.
Why, do you want to close this thread?
[edit]Your urgency is not ours. Spamming the boards will decrease the likelihood of a reasonable response. Bumping threads ain't gonna help ya neither.
7. It is easier to write an incorrect program than understand a correct one.
40. There are two ways to write error-free programs; only the third one works.*
TRust me I'm in lab right now trying to work on it, but the TA only gives vague answers. Well thanks for the help Can I have a title?
Slacker?
C'mon, with instructions like this you can't even come up with a couple skeletal functions?
Please use the following function names: SetMatrixA( ), DisplayMatrixA( ), AddMatrixBtoA( ) to perform the matrix addition, MultiplyMatrixBtoA( ) for matrix multiplication, TransposeMatrixA(), and InvertMatrixA().
7. It is easier to write an incorrect program than understand a correct one.
40. There are two ways to write error-free programs; only the third one works.*
Code:void SetMatrix(double A[5][5], char z) { printf("Please enter matrix %c:\n", z); for(i=0; i<=rowA; i++) { for(j=0; j<=columnA; j++) { printf("Row %d, Column %d: ", i+1, j+1); scanf("%lf", &A[i][j]); } }
what does char z do in this statement
I'm very close to closing this thread since it's a blatant attempt by a lazy student to get someone else to do their homework.
7. It is easier to write an incorrect program than understand a correct one.
40. There are two ways to write error-free programs; only the third one works.*
Help
[edit]Don't bump threads! It's just going to make people less willing to respond. [/edit]Help
It is a parameter to the function SetMatrix(). A parameter is a way to pass information in (and sometimes out) of a function. Yes, it is a type of variable.
Here's a simple example:
[edit=2] I suggest you have a quick look over these tutorials, especially the "function" one. cprogramming.com/tutorial.html [/edit]Code:#include <iostream> void function(int parameter); int main() { int value = 3; function(value); return 0; } void function(int parameter) { std::cout << parameter << std::endl; }
Last edited by dwks; 03-05-2008 at 06:17 PM.
dwk
Seek and ye shall find. quaere et invenies.
"Simplicity does not precede complexity, but follows it." -- Alan Perlis
"Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
"The only real mistake is the one from which we learn nothing." -- John Powell
Other boards: DaniWeb, TPS
Unofficial Wiki FAQ: cpwiki.sf.net
My website: http://dwks.theprogrammingsite.com/
Projects: codeform, xuni, atlantis, nort, etc.
So you are asked to code this and don't understand what a char is? Either your teacher/prof is going way too fast or you are not listening. I find it hard to believe you would have been given this type of assignment and yet know as little as you do about the language.
This is why I'm hesistant to help.
Here's another example of how functions work. It might help you with your homework.
The best help i can offer is my sincere regret that time unfortunately passes.Help
A typical example of ...cheap programming practices.Code:... goto johny_walker_red_label; johny_walker_blue_label: exit(-149$); johny_walker_red_label : exit( -22$);
Thanks For Nothing