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
Prime calculator using bool
check Prime
algortym A*
combine c++ string with dynamically allocated c array of chars through overloaded add operator
Breakfast Function
multimap
Dar
Float
Memory_test
Simulare 2022 SIII, 1