I understand that. It took away some of my errors. But how should I define the constructor in the header? and how do I use it in the main?
sorry for all the questions. I just haven't had much...
Type: Posts; User: hottiefee
I understand that. It took away some of my errors. But how should I define the constructor in the header? and how do I use it in the main?
sorry for all the questions. I just haven't had much...
And yeah that makes sense with the period. thanx (:
I changed the multiplication function to:
friend matrix operator * (matrix, matrix){ //multiply 2 matrices
double productArray[MAX_ROWS][MAX_COLUMNS];
if(a.columns = b.rows){ //i, j...
Hi everyone. I am trying to create a matrix. I'm trying to write a matrix program that the user will input the matrices and the program will add, subtract, and multiply the 2 matrices.
Before...
Oh yeah!! Thanks. I haven't used that since the begining of last semester so I forgot it. Thank you so much for the help :)
Awesome. It's working now :) Thanks! The only thing is how do I set it to where it always shows the answer with 6 decimal places? I tried setpresicion(7) but that displays 7 digits instead of 6...
That didn't change anything that I can see. The answer still comes out to -1.#INF. Even when I try sqroot(16) I get the same answer (-1.#INF not 4). Why would I change TOLERANCE to 100? Since the...
Okay I think I have everything done, but how do you set a tolerance? Like I have to set a tolerance of 10^-6 (6 decimal places). Would it be like:
#define TOLERANCE 10^-6
? That's what I...
Thanks. :)
Alright I think I get it. I'll work on it some more... I'll let ya know how it goes tomorrow prob.
Thats what I thought but the end of the instructions said test your program on sqroot(2) 3rd root(7) and 3rd root(-1)... I just asked my professor because that didn't make sense to me.
How will I know what f(x) is if the user only enters the number to find the nth root of and n (the degree of the root)?
Yeah. I'm starting to feel overwhelmed... :( lol I usually get these program fast but I'm stuck on this one... I know f(x) is the function of the curve, I think, so how do I even get that equation? ...
How can you calculate a derivative in c++? I know how on paper but don't know how to type it up...
lol alright thanks. :) Ill let ya know how it goes.. workin on it now.
Hey everyone. I am trying to write a program using Newtons Method. I know there is no code here, but that's my problem... I don't know where to start. I know the method is similar to bisection so...
It worked! (using one function to take all 3 arrays). Thanks so much. Have a good day.
Thanks! I seen that was my problem and I've been wondering how to fix it. I'm working on it now. :)
Okay. Here is what I have.
#include<iostream>
#include<iomanip>
#define MAX_SIZE 25
void getArray1(int[], int&, int&);
void getArray2(int[], int&);
void getArray3(int[], int&);
Thank you. I'll try that.
Hi everyone. I am working on making a program that deals with household surveys. I am still learning C++ and my first time dealing with more than one array. Here is the problem:
Write a program...
AWESOME! Thanks. I was working on this for a long time. :) It works completely now. Thank you so much!! Just little details had to be worked out.
Have a great day!
Okay I changed the gcd() function to:
int gcd(int a, int b){
if (b = 0)
return a;
else
return gcd(b, a%b);
}
Does my add() function look right? Thats all im confused on now. I just dont see how I have no final answer for my displayFraction() function...
oh okay. thanks. I get that