Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Cross Multiplication
//g++ 7.4.0 //cross multiplication: solving 2-variable simultaneous equation //created by Rezaul Hoque on December 03,2020; //contact: jewelmrh@yahoo.com #include <iostream> using namespace std; int main () { float a,b,c,p,q,r,x,y; cout<<"Equations look like:\n"; cout<<"ax + by + c = 0\n"; cout <<"px + qy + r = 0\n"; cout <<endl; cout <<" Now enter a,b,c,p,q,r:\n"; cin>>a>>b>>c>>p>>q>>r; cout <<endl; cout<<" After entering the coefficients, equations look like:\n"; cout<<"("<<a<<")"<<"x "; cout<<"+"<<"("<<b<<")"<<"y"<<"+"; cout<<"("<<c<<")"<<" = 0\n"; cout<<"("<<p<<")"<<"x "; cout<<"+"<<"("<<q<<")"<<"y"<<"+"; cout<<"("<<r<<")"<<" = 0\n"; x = (b*r - q*c)/(a*q - p*b); y= ( c*p - r*a)/(a*q - p*b); cout<<"The solutions are:\n"; cout<<"x = "<<x; cout<<endl; cout <<"y = "<<y; return 0; }
run
|
edit
|
history
|
help
0
p30
Algoritm(prelucrare cifre)
Luces led con relé
Inventory
Binary Search
cppPyPoly2
Find the Duplicate Number in array of n+1 integers having elements from 1 to n
Travel Buddy
javascript style arrays in c++
RuntimeError