Make a programe by using maths equations... | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Make a programe by using maths equations...

29th Aug 2017, 3:09 PM
Adil Hussain
Adil Hussain - avatar
19 Answers
+ 9
That's a good one. I found a good source code for you. Hope you find it useful. https://www.programiz.com/cpp-programming/examples/quadratic-roots
29th Aug 2017, 4:13 PM
Babak
Babak - avatar
+ 8
Example equation[source: https://stackoverflow.com/questions/32590456/how-to-write-this-math-equation-into-c] 4x^3 + 8x^2 + 9x - 18 y = -------------------------- |7 – x^3| + √(3x^2 + 18) #include <iostream> #include <cmath> using namespace std; int main() { int x = 2; double y = (4.0 * pow(x, 3.0) + 8.0 * pow(x, 2.0) + 9.0 * x - 18.0) / (std::abs(7.0 - pow(x, 3.0)) + sqrt(3.0 * pow(x, 2.0) + 18)); cout << y << endl; }
29th Aug 2017, 3:32 PM
Babak
Babak - avatar
+ 8
Nice work Adil, But let me do some make up. #include<iostream.h> #include<conio.h> int main (void) { int a,b,c,x; int a=1,b=2,c=3,x=10; int Result=a*x+b*x+c; std::cout<<Result; getch( ); }
29th Aug 2017, 3:46 PM
Babak
Babak - avatar
+ 8
What are you exactly looking for?
29th Aug 2017, 3:48 PM
Babak
Babak - avatar
+ 8
I see. So is there a specific equation that you want to working on it?
29th Aug 2017, 3:52 PM
Babak
Babak - avatar
+ 8
I think you have a math book ,right? If so choose a formula from that. Then tell me the name.
29th Aug 2017, 3:56 PM
Babak
Babak - avatar
+ 1
thank you sir
29th Aug 2017, 3:33 PM
Adil Hussain
Adil Hussain - avatar
+ 1
#include<iostream.h> #include<conio.h> void main (void) { clrscr; into a,b,c,x,sum; into a=1,b=2,c=3,x=10; Result=a*x+b*x+c; cout<<Result; fetch( ); }
29th Aug 2017, 3:39 PM
Adil Hussain
Adil Hussain - avatar
+ 1
thank you very much sir I will checked...
29th Aug 2017, 4:15 PM
Adil Hussain
Adil Hussain - avatar
+ 1
its ok help to make a program by using maths formulas in that method which I written in comment
29th Aug 2017, 4:38 PM
Adil Hussain
Adil Hussain - avatar
0
but sir I need thuis methods of programing by using simple maths formulas can you do
29th Aug 2017, 3:47 PM
Adil Hussain
Adil Hussain - avatar
0
my teacher give me an assignment that make a programs like this method using simple maths formulas
29th Aug 2017, 3:50 PM
Adil Hussain
Adil Hussain - avatar
0
so help me for this type of programs
29th Aug 2017, 3:51 PM
Adil Hussain
Adil Hussain - avatar
0
no I don't have any specific maths formula
29th Aug 2017, 3:54 PM
Adil Hussain
Adil Hussain - avatar
0
wait I will check there...
29th Aug 2017, 4:01 PM
Adil Hussain
Adil Hussain - avatar
0
b squre _4ac
29th Aug 2017, 4:07 PM
Adil Hussain
Adil Hussain - avatar
0
b^_4ac=0
29th Aug 2017, 4:12 PM
Adil Hussain
Adil Hussain - avatar
0
which one...
29th Aug 2017, 4:35 PM
Adil Hussain
Adil Hussain - avatar
0
sorry dude my mistake
29th Aug 2017, 4:36 PM
Ak . Unfamous
Ak . Unfamous - avatar