So i have a question on how i should start doing this... pretty new at c++
i have to ask the user for an integer, an operator, and then another integer to give an answer. But i also have to show the whole equation. I want to try to use loops to do this.
63 5305
So i have a question on how i should start doing this... pretty new at c++
i have to ask the user for an integer, an operator, and then another integer to give an answer. But i also have to show the whole equation. I want to try to use loops to do this.
So you want to ask the user for all that input *repeatedly* don't you? Otherwise
I don't see any reason for a loop except if you want to make your program robust
and ask for correct input over and over again if the user makes a mistake.
kind regards,
Jos
Well i want to ask the user to put in the integer and then the operator and then the next integer but not all at once. and then if they put 2 a + then a 3 i need it to say 2+3=5
So you want to ask the user for all that input *repeatedly* don't you? Otherwise
I don't see any reason for a loop except if you want to make your program robust
and ask for correct input over and over again if the user makes a mistake.
kind regards,
Jos
Well i want to ask the user to put in the integer and then the operator and then the next integer but not all at once. and then if they put 2 a + then a 3 i need it to say 2+3=5
Well, let's start there then but it doesn't take a loop; pseudo code alert: -
int a= askInteger("please give left operand");
-
char op= askCharacter("please give one of +-*/");
-
int b= askInteger("please give right operand");
-
-
int result;
-
switch (op) {
-
// according to the value of op, assign the
-
// correct value to variable 'result'
-
}
-
printf("%d%c%d=%d\n", a, op, b, result);
-
All you have to do now is complete the two input functions and the content of
the switch statement.
kind regards,
Jos
I don't quite understand how that works.
Well, let's start there then but it doesn't take a loop; pseudo code alert: -
int a= askInteger("please give left operand");
-
char op= askCharacter("please give one of +-*/");
-
int b= askInteger("please give right operand");
-
-
int result;
-
switch (op) {
-
// according to the value of op, assign the
-
// correct value to variable 'result'
-
}
-
printf("%d%c%d=%d\n", a, op, b, result);
-
All you have to do now is complete the two input functions and the content of
the switch statement.
kind regards,
Jos
Anyone else have a simpler idea or can explain it for me.
Anyone else have a simpler idea or can explain it for me.
What Jos is trying to say is: you don't need a loop (atleast how the problem was explained). If you want the user to insert 2 arguements and a mathematical operation (+ or - for example),
1.) ask for the first arguement
2.) ask for the second arguement
3.) ask for the mathematical expression.
4.) Use a switch statement to control to find result.
5.) Print out equation and result.
However, if you want the user to put in any number of arguments (1+1 - 3 = ?), you must do something different.
This is what I started to do and i know its not gonna work.. What should i do from here??? - int main()
-
{
-
int num1, num2, answer;
-
char operator;
-
cout<< "Input Integer.\n";
-
cin>> num1;
-
-
do
-
{
-
cout<< "Choose + for addition.\n"
-
<< "Choose - for subtraction.\n"
-
<< "Choose * for multiplication.\n"
-
<< "Choose / for division.\n"
-
<< "Enter choice and press Return; ";
-
cin>> operator;
-
cout<< "Input Second Integer";
-
cin>> num2;
-
-
-
switch (operator)
-
{
-
int answer;
-
case 1:
-
-
num1+num2=answer;
-
cout<< " The Answer is: "<<num1+num2=answer<<".\n";
-
break;
-
-
case 2:
-
-
num1-num2=answer;
-
cout<< " The Answer is: "<<num1-num2=answer<<".\n";
-
break;
-
-
case 3:
-
-
num1*num2=answer;
-
cout<< " The Answer is: "<<num1*num2=answer<<".\n";
-
break;
-
-
case 4:
-
-
num1/num2=answer;
-
cout<< " The Answer is: "<<num1/num2=answer<<".\n";
-
break;
-
-
default:
-
-
cout<< "This is not a correct operator.\n";
-
cout<< "Choose Again.\n";
-
}
-
}while (operator != +,-,*,/);
-
-
return0;
-
}
This is what I started to do and i know its not gonna work.. What should i do from here???
int main()
{
int num1, num2, answer;
char operator;
cout<< "Input Integer.\n";
cin>> num1;
do
{
cout<< "Choose + for addition.\n"
<< "Choose - for subtraction.\n"
<< "Choose * for multiplication.\n"
<< "Choose / for division.\n"
<< "Enter choice and press Return; ";
cin>> operator;
cout<< "Input Second Integer";
cin>> num2;
switch (operator)
{
int answer;
case 1:
num1+num2=answer;
cout<< " The Answer is: "<<num1+num2=answer<<".\n";
break;
default:
cout<< "This is not a correct operator.\n";
cout<< "Choose Again.\n";
}
}while (operator != +,-,*,/);
return0;
}
it's okay. The logic is totally there but you just need to fix some syntax problems. Your switch statement checks if the user inputs "1, 2, 3, or 4". I would suggest reading Switch Statements since there an example that will directly help you.
Also, the expression (operator != +,-,*,/) is not correct. Right idea but not what you want. You need to compare a character to a character, then another character to another character. If I was to write it in words, it would be:
while operator != addition sign OR operator != subtraction sign OR ...
Furthermore, you can never choose again with the logic you are using (I don't know if you want to do that).
Instead of case 1: would i put case '+': ?
and also should it be while ((operator != +) && (operator != -) &&....)
And the choose again part i didnt work on yet i was just putting it there to remind myself i had to do it.
is there any other suggestions you have?
it's okay. The logic is totally there but you just need to fix some syntax problems. Your switch statement checks if the user inputs "1, 2, 3, or 4". I would suggest reading Switch Statements since there an example that will directly help you.
Also, the expression (operator != +,-,*,/) is not correct. Right idea but not what you want. You need to compare a character to a character, then another character to another character. If I was to write it in words, it would be:
while operator != addition sign OR operator != subtraction sign OR ...
Furthermore, you can never choose again with the logic you are using (I don't know if you want to do that).
Instead of case 1: would i put case '+': ?
and also should it be while ((operator != +) && (operator != -) &&....)
And the choose again part i didnt work on yet i was just putting it there to remind myself i had to do it.
is there any other suggestions you have?
try it out and see what happens. You will learn much more if you try everything you can think of before coming to us ;)
if i have my equation set so that x+y=z and the user is inputing x and y
how do i get it to print out the numbers in place so that if he put in 5 and 6 it will say 5+6=11???
try it out and see what happens. You will learn much more if you try everything you can think of before coming to us ;)
Did you try it yourself as kreagan suggested? What did you find? What are you confused with?
Ok well i totally changed my code. I think I'm close but i cant figure out what some of my error messages are on my compiler. Also at the end i need to ask the user whether or not he wants to restart to program by just typing y to restart or any other button to exit. -
int main()
-
{
-
int x, y, z;
-
char operator;
-
-
cout<< " Welcome to the Calculator.\n";
-
cout<< " Input first number.\n";
-
cin>> x;
-
cout<< " Input + for addition, - for subtraction, * for multiplication, or / for division.\n";
-
cin>> operator;
-
cout<< " Input second number.\n";
-
cin>> y;
-
-
-
if (operator == "+")
-
{
-
x+y=z;
-
cout<<"The Answer is: "<<x+y=z<<".\n";
-
}
-
-
if (operator == "-")
-
{
-
x-y=z;
-
cout<<"The Answer is: "<<x-y=z<<".\n";
-
}
-
-
if (operator == "*")
-
{
-
x*y=z:
-
cout<<"The Answer is: "<<x*y=z<<".\n";
-
}
-
-
if (operator == "/")
-
{
-
x/y=z;
-
cout<<"The Answer is: "<<(x/y)=z<<".\n";
-
cout<<"The Remainder is: "<<(x%y)<<".\n";
-
}
-
-
else
-
cout<<"Invalid Operator";
-
-
return 0;
-
}
Can you post your error message?
And you want for a section of your code to repeat/loop while the user keeps inputting 'y'?
Okay, I'm getting a weird error with your declaration of char operator, but besides that, you need to research variables in C/C++. You have several times
x + y = z
This takes the value in z, stores it in y, and then adds x. But you never save it, so it doesn't so anything with that value. You want:
z = x + y
Then you will have that value in z, and can use it later.
Can you post your error message?
And you want for a section of your code to repeat/loop while the user keeps inputting 'y'?
I want for my whole program to rerun after at the end, but let it ask the user if he wants to rerun it or not.
expected primary-expression before "char"
expected ';' before char
expected identifier before ';' token
expected ')' before string constant
could not convert 'std::operator==' to 'bool'
non-lvalue in assignment
invalid operands of types 'int' and 'const char[3]' to binary 'operator<<'
thats some of them but they basically repeat because of each section
Okay, I'm getting a weird error with your declaration of char operator, but besides that, you need to research variables in C/C++. You have several times
x + y = z
This takes the value in z, stores it in y, and then adds x. But you never save it, so it doesn't so anything with that value. You want:
z = x + y
Then you will have that value in z, and can use it later.
ya i did that last program i tried to write too.. you think i would have learned
I want for my whole program to rerun after at the end, but let it ask the user if he wants to rerun it or not.
expected primary-expression before "char"
expected ';' before char
expected identifier before ';' token
expected ')' before string constant
could not convert 'std::operator==' to 'bool'
non-lvalue in assignment
invalid operands of types 'int' and 'const char[3]' to binary 'operator<<'
thats some of them but they basically repeat because of each section
Any ideas on what i should do because i need to try to get it done for tomorrow?
My code is trying to ask for integer,operator, and another integer... and then use it to form an equation and print it out showing the exact equation... any ideas? -
int main()
-
{
-
int x, y, z;
-
char operator;
-
-
cout<< " Welcome to the Calculator.\n";
-
cout<< " Input first number.\n";
-
cin>> x;
-
cout<< " Input + for addition, - for subtraction, * for multiplication, or / for division.\n";
-
cin>> operator;
-
cout<< " Input second number.\n";
-
cin>> y;
-
-
-
if (operator=+)
-
{
-
z=x+y;
-
cout<<"The Answer is: "<<x+y=z<<".\n";
-
}
-
-
if (operator=-)
-
{
-
z=x-y;
-
cout<<"The Answer is: "<<x-y=z<<".\n";
-
}
-
-
if (operator=*)
-
{
-
z=x*y:
-
cout<<"The Answer is: "<<x*y=z<<".\n";
-
}
-
-
if (operator=/)
-
{
-
z=x/y;
-
cout<<"The Answer is: "<<(z=x/y)<<".\n";
-
cout<<"The Remainder is: "<<(x%y)<<".\n";
-
}
-
-
else
-
cout<<"Invalid Operator";
-
-
return 0;
-
}
My code is trying to ask for integer,operator, and another integer... and then use it to form an equation and print it out showing the exact equation... any ideas?
int main()
{
int x, y, z;
char operator;
cout<< " Welcome to the Calculator.\n";
cout<< " Input first number.\n";
cin>> x;
cout<< " Input + for addition, - for subtraction, * for multiplication, or / for division.\n";
cin>> operator;
cout<< " Input second number.\n";
cin>> y;
if (operator=+)
{
z=x+y;
cout<<"The Answer is: "<<x+y=z<<".\n";
}
if (operator=-)
{
z=x-y;
cout<<"The Answer is: "<<x-y=z<<".\n";
}
if (operator=*)
{
z=x*y:
cout<<"The Answer is: "<<x*y=z<<".\n";
}
if (operator=/)
{
z=x/y;
cout<<"The Answer is: "<<(z=x/y)<<".\n";
cout<<"The Remainder is: "<<(x%y)<<".\n";
}
else
cout<<"Invalid Operator";
return 0;
}
Your if statements are wrong: -
if (operator == "+")
-
{}
-
else if (operator== "-")
-
{}
-
// ... so on ...
Also, you might have to delete the new line in the stream left by cin.
Your if statements are wrong: -
if (operator == "+")
-
{}
-
else if (operator== "-")
-
{}
-
// ... so on ...
Also, you might have to delete the new line in the stream left by cin.
What did you mean by that last part... You are probably right with the first part but that didnt change any of the error messages im getting with my code.. It actually gave me totally different errors..
What did you mean by that last part... You are probably right with the first part but that didnt change any of the error messages im getting with my code.. It actually gave me totally different errors..
Also, when you display the answer you do this: -
z = x + y;
-
cout << "The answer is: " << z << endl;
-
-
// ... or ...
-
cout << "The answer is: " << x + y << endl; // no need for z variable
-
Also, when you display the answer you do this: -
z = x + y;
-
cout << "The answer is: " << z << endl;
-
-
// ... or ...
-
cout << "The answer is: " << x + y << endl; // no need for z variable
-
Well i was trying to make it so it would display my equation... so if x =5 and y= 6 it was print out 5+6=11
Well i was trying to make it so it would display my equation... so if x =5 and y= 6 it was print out 5+6=11
Well ok. You have the two numbers in the variables and you know how to print with cout so I think you could figure this out yourself. Remember you need to use quotes unless you are printing a variable.
Well ok. You have the two numbers in the variables and you know how to print with cout so I think you could figure this out yourself. Remember you need to use quotes unless you are printing a variable.
I thought about what i should do so i put quotes around the +, - and such and i got a big error message... was that wrong?
I thought about what i should do so i put quotes around the +, - and such and i got a big error message... was that wrong?
I think i figured that part out.... i have one error for every if statement line left...
it says expected primary expression before char and operator== not defined and expected ) before string constant
I thought about what i should do so i put quotes around the +, - and such and i got a big error message... was that wrong?
Did you do this: -
cout << "The answer is: " << x "-" y "=" z << endl;
-
You need to sperate them: -
cout << "The asnwer is: " << x << "-" << y << "=" << z << endl;
-
Did you do this: -
cout << "The answer is: " << x "-" y "=" z << endl;
-
You need to sperate them: -
cout << "The asnwer is: " << x << "-" << y << "=" << z << endl;
-
it says expected identifier before ")" token for this part...
else if ((operator) = "/")
int main()
{
int x, y, z;
char operator;
cout<< " Welcome to the Calculator.\n";
cout<< " Input first number.\n";
cin>> x;
cout<< " Input + for addition, - for subtraction, * for multiplication, or / for division.\n";
cin>> operator;
cout<< " Input second number.\n";
cin>> y;
if ((operator) = "+")
{
z=x+y;
cout<<"The Answer is: "<<x<<"+"<<y<<"="<<z<<".\n";
}
else if ((operator) = "-")
{
z=x-y;
cout<<"The Answer is: "<<x<<"-"<<y<<"="<<z<<".\n";
}
else if ((operator) = "*")
{
z=x*y;
cout<<"The Answer is: "<<x<<"*"<<y<<"="<<z<<".\n";
}
else if ((operator) = "/")
{
z=x/y;
cout<<"The Answer is: "<<x<<"/"<<y<<"="<<z<<".\n";
cout<<"The Remainder is: "<<x<<"%"<<y<<".\n";
}
else
(cout<<"Invalid Operator");
return 0;
}
I'm just stuck and don't know what to do... plus i need to make it rerun the program at the end by asking the user whether or not he wants to rerun the program.... but i have no idea...
Is this your code or where did you get it from?
I used the gcc compiler to test it and found: - charlie$ gcc test.c
-
test.c: In function `main':
-
test.c:6: error: `cout' undeclared (first use in this function)
-
test.c:6: error: (Each undeclared identifier is reported only once
-
test.c:6: error: for each function it appears in.)
-
test.c:8: error: `cin' undeclared (first use in this function)
-
test.c:15: warning: assignment makes integer from pointer without a cast
-
test.c:21: warning: assignment makes integer from pointer without a cast
-
test.c:27: warning: assignment makes integer from pointer without a cast
-
test.c:33: warning: assignment makes integer from pointer without a cast
-
test.c:44:2: warning: no newline at end of file
-
Something is missing in your code.
Is this your code or where did you get it from?
I used the gcc compiler to test it and found: - charlie$ gcc test.c
-
test.c: In function `main':
-
test.c:6: error: `cout' undeclared (first use in this function)
-
test.c:6: error: (Each undeclared identifier is reported only once
-
test.c:6: error: for each function it appears in.)
-
test.c:8: error: `cin' undeclared (first use in this function)
-
test.c:15: warning: assignment makes integer from pointer without a cast
-
test.c:21: warning: assignment makes integer from pointer without a cast
-
test.c:27: warning: assignment makes integer from pointer without a cast
-
test.c:33: warning: assignment makes integer from pointer without a cast
-
test.c:44:2: warning: no newline at end of file
-
Something is missing in your code.
I know im missing something i just cant figure out what??
Two things.
1) Put an extra newline at the end of your code. gcc annoyingly reports this although its not really a problem.
2) You need some includes here. cout is not part of the C++ language persay but rather part of the iostream package. So just put this at the top of your file:
#include <iostream>
I really need some help to figure this out which is due tomorrow... so anyone that can help please send something
Two things.
1) Put an extra newline at the end of your code. gcc annoyingly reports this although its not really a problem.
2) You need some includes here. cout is not part of the C++ language persay but rather part of the iostream package. So just put this at the top of your file:
#include <iostream>
i do have that at the top of my code i just didnt paste it in.... what line do i need to add to the bottom
The bottom is just hit enter one more time.
As for the other issues you may need:
using namespace std;
before the main function
The bottom is just hit enter one more time.
As for the other issues you may need:
using namespace std;
before the main function
i have that too... let me give u my errors... im using emacs....
expected primary-expression before "char"
expected ';' before "char"
expected identifier before ';' token
expected identifier before ')' token.... and the continues for three more of them
Anyone else with any ideas... i need help!!!
Oh ok, confused by the other list of errors. Three issues I found when compiling this:
1. The symbol 'operator' is reserved and cannot be used as a variable name. So this trips up the code. Just rename it and all the places you use it.
2. The operator '=' you use in your if statements are assignment operators not the comparison operator, which is '=='. So the code you have is trying to assign a new value to the variable.
3. In your if statments you are comparing a char to a string. The "+" means a string but since your variable is a single character you want '+'
Fix these up and the code should compile for you.
Oh ok, confused by the other list of errors. Three issues I found when compiling this:
1. The symbol 'operator' is reserved and cannot be used as a variable name. So this trips up the code. Just rename it and all the places you use it.
2. The operator '=' you use in your if statements are assignment operators not the comparison operator, which is '=='. So the code you have is trying to assign a new value to the variable.
3. In your if statments you are comparing a char to a string. The "+" means a string but since your variable is a single character you want '+'
Fix these up and the code should compile for you.
the last thing i have to ask is that if i want to ask the user whether or not he wants to rerun the program... how do i do that... i just want to have him have to enter like y to run again or any other key to exit...
You can't rerun the program per day. What you want is to do a loop in your program to rerun the code you have. An example of this would be:
char rerun_choice = 'c'; - while (rerun_choice == 'y')
-
{
-
cout << "continue? ";
-
cin >> rerun_choice;
-
}
In this code as long as the user hits y <enter> they will be asked again and again. Any other letter and it exits the loop. Actually the better approach here would be a do while loop. Similar to above but the while part is at the bottom, so it runs once regardless of the check. Lookup in your C manual on how to use, its a nice C feature.
You can't rerun the program per day. What you want is to do a loop in your program to rerun the code you have. An example of this would be:
char rerun_choice = 'c'; - while (rerun_choice == 'y')
-
{
-
cout << "continue? ";
-
cin >> rerun_choice;
-
}
In this code as long as the user hits y <enter> they will be asked again and again. Any other letter and it exits the loop. Actually the better approach here would be a do while loop. Similar to above but the while part is at the bottom, so it runs once regardless of the check. Lookup in your C manual on how to use, its a nice C feature.
the only thing that this did was ask if i wanted to continue... it didnt rerun the whole program... also everytime i try anything other than addition it still adds...
You need to put you code in this while loop. Anything in the while loop will be executed. So put the while loop around the code you already had.
You need to put you code in this while loop. Anything in the while loop will be executed. So put the while loop around the code you already had.
i put it in and its exited my program no matter what i put in.
Post your current code again. I must have missed something.
#include <iostream>
using namespace std;
int main()
{
int x, y, z;
char oper, rerun_choice = 'c';
while (rerun_choice == 'y');
{
cout<< " Welcome to the Calculator.\n";
cout<< " Input first number.\n";
cin>> x;
cout<< " Input + for addition, - for subtraction, * for multiplication, or / for division.\n";
cin>> oper;
cout<< " Input second number.\n";
cin>> y;
if ((oper) = '+')
{
z=x+y;
cout<<"The Answer is: "<<x<<"+"<<y<<"="<<z<<".\n";
}
if ((oper) = '-')
{
z=x-y;
cout<<"The Answer is: "<<x<<"-"<<y<<"="<<z<<".\n";
}
if ((oper) = '*')
{
z=x*y;
cout<<"The Answer is: "<<x<<"*"<<y<<"="<<z<<".\n";
}
if ((oper) = '/')
{
z=x/y;
cout<<"The Answer is: "<<x<<"/"<<y<<"="<<z<<".\n";
cout<<"The Remainder is: "<<x<<"%"<<y<<".\n";
}
cout<<"continue?";
cin>> rerun_choice;
}
return 0;
}
I have a couple questions....
1) why the rerun isnt working
2) when i run the program it is printing out all the equations for +,-,*,/ and also for % which i want to be the remainder
2b) the remainder is not coming out to be what i want.. instead its just plugging in the normal values for x and y and shoving % in the middle...
1) why the rerun isnt working
Ok the code I gave should have set the rerun_choice to 'y' initially. Whats happening is its failing the while loop from the onset. Just use a do...while loop. Easy to change just move the while () line to the end of the loop (ie just before the return call) and where the while was put a do. Then it does not matter what you set the initial value of the rerun_choice to since the evaluation happens at the end.
so it would be - do {
-
<all your code>
-
} while (rerun_choice == 'y');
-
2) when i run the program it is printing out all the equations for +,-,*,/ and also for % which i want to be the remainder
2b) the remainder is not coming out to be what i want.. instead its just plugging in the normal values for x and y and shoving % in the middle...
That's because the cout line just output data and you have the % in there as a string not an operator, they do not calculate anything. So rework the line to be: - cout<<"The Remainder is: "<<(x % y)<<".\n";
The remainder part is fixed and i put in the do while but it is still just exiting the program... also i don't want it to print out all of the equations i only want it to print the + equation if i choose + and the - if i choose -...
When asked to continue are you hitting 'y' and then enter?
As for the part about it executing all of the operations, it's your if statements. Two items I would do:
1) You are still not using the comparator. All comparison should use '==' not the single = value.
2) I would also do if, else if. So we would have: - if (oper == '+')
-
{
-
z=x+y;
-
cout<<"The Answer is: "<<x<<"+"<<y<<"="<<z<<".\n";
-
}
-
-
else if (oper == '-')
-
{
-
z=x-y;
-
cout<<"The Answer is: "<<x<<"-"<<y<<"="<<z<<".\n";
-
}
-
-
....
-
Finally, when posting code, try to use the code block (the # button when posting) it makes things a little easier to read.
When asked to continue are you hitting 'y' and then enter?
As for the part about it executing all of the operations, it's your if statements. Two items I would do:
1) You are still not using the comparator. All comparison should use '==' not the single = value.
2) I would also do if, else if. So we would have: - if (oper == '+')
-
{
-
z=x+y;
-
cout<<"The Answer is: "<<x<<"+"<<y<<"="<<z<<".\n";
-
}
-
-
else if (oper == '-')
-
{
-
z=x-y;
-
cout<<"The Answer is: "<<x<<"-"<<y<<"="<<z<<".\n";
-
}
-
-
....
-
Finally, when posting code, try to use the code block (the # button when posting) it makes things a little easier to read.
instead of asking to continue its just rerunning the program... im not sure if i have everything placed right...
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Russell Blau |
last post by:
This is not really a Python question, but it does relate to a Python program
I'm working on, so this seems like as good a place as any to ask for
suggestions ...
I'm working on a GUI application...
|
by: Brian Kazian |
last post by:
Here's my problem, and hopefully someone can help me figure out if there is
a good way to do this.
I am writing a program that allows the user to enter an equation in a text
field using...
|
by: Michael MacDonald |
last post by:
I have written a simple program that calculates a running $ total. This
program uses a checkbox to acknowledge that that version of the ticket
is desired and it checks the Qty box to see how many...
|
by: Trev17 |
last post by:
Hello, I am new to C++ and i have tried for several hours to make a program my teacher has given me as a lab. Here is the Lab question:
the roots of the quadratic equation ax^2 + bx + c = 0, a...
|
by: shanazzle |
last post by:
so I've just begun learning python for a school course. I have to write a simple program that finds the first derivative of the equation
Y= Ax^4 + Bx^3 + Cx^2 + Dx + E
so far i can have the user...
|
by: kjcheste |
last post by:
I'm trying to have C++ solve an equation I have set up.
The equation is:
angle = (1/16)*(pow(LS,2) + LS*sqrt(pow(LS,2) + pow(16,2) - 1) - 1);
where LS is a number from -1 to 1 by increasing it...
|
by: ioannoual |
last post by:
Hi...I 'am new in C and I want a program that solves a quadratic equation!!
I try something by my self to write some code about that but I want you to help me writing a new one that will work!!
...
|
by: bbench123 |
last post by:
Make a program that will ask for values of a quadratic equation (ax2+bx+c).
the program must determine the roots of the equation using the quadratic equation determinants to distinguish if the roots...
|
by: candacefaye1 |
last post by:
1. write a C++ program to decide if the coefficients of a quadratic equation have real roots. The three choices will be to write the message “zero divide” when A is zero, write the message “no real...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |