Add to Favorites    Make Home Page 134619 Online
 Language Categories
 Source Codes Home Project Ideas New! Interview Questions FAQs Home ASP Home ASP Source Codes ASP Script Directory New! ASP .Net Script Directory New! ASP Interview Questions ASP FAQs ASP How Tos C Home C Source Codes C Script Directory New! C Interview Questions C FAQs C How Tos C++ Home C++ Source Codes C++ Script Directory New! C++ Interview Questions C++ FAQs C++ How Tos Java Home Java Source Codes Java Directory New! Java Interview Questions Java FAQs Java How Tos JavaScript Home JavaScript Directory New! JavaScript Source Codes JavaScript FAQs JavaScript How Tos COBOL Home COBOL Source Codes COBOL FAQs COBOL How Tos Pascal Home Pascal Source Codes Pascal FAQs Pascal How Tos PHP Script Directory New! Python Script Directory New! Perl & CGI Script Directory New! Flash Script Directory New! CFML Script Directory New! Remotely Hosted Scripts New! Tools & Utilities Directory New! XML Script Directory New! Best Programmers Amit Mathur Vishal Bhardwaj Deepesh Jain Vyom NetWork
 Our Services

Home » C++ Home » Mathematics Home » Program to solve a 3 Variable Linear Equation.

A D V E R T I S E M E N T

Search Projects & Source Codes:

 Title Program to solve a 3 Variable Linear Equation. Author Adarsh Ramamurthy Author Email adarsh83 [at] rediffmail.com Description Solves any 3 variable linear equation. Category C++ » Mathematics Hits 380313 Code Select and Copy the Code #include #include #include main() { clrscr(); float a,b,c,d,l,m,n,k,p,D,q,r,s,x,y,z; printf("PROGRAM TO SOLVE THREE VARIABLE LINEAR SIMULTANEOUS EQUATIONS "); printf("The equations are of the form: ax+by+cz+d=0 lx+my+nz+k=0 px+qy+rz+s=0 "); printf("Enter the coefficients in the order a,b,c,d,l,m,n,k,p,q,r,s "); scanf("%f%f%f%f%f%f%f%f%f%f%f%f",&a,&b,&c,&d,&l,&m,&n,&k,&p,&q,&r,&s); printf(" The equations you have input are: "); printf(" %.2f*x + %.2f*y + %.2f*z + %.2f = 0 ",a,b,c,d); printf(" %.2f*x + %.2f*y + %.2f*z + %.2f = 0 ",l,m,n,k); printf(" %.2f*x + %.2f*y + %.2f*z + %.2f = 0 ",p,q,r,s); D = (a*m*r+b*p*n+c*l*q)-(a*n*q+b*l*r+c*m*p); x = ((b*r*k+c*m*s+d*n*q)-(b*n*s+c*q*k+d*m*r))/D; y = ((a*n*s+c*p*k+d*l*r)-(a*r*k+c*l*s+d*n*p))/D; z = ((a*q*k+b*l*s+d*m*p)-(a*m*s+b*p*k+d*l*q))/D; printf("The solutions to the above three equations are : "); printf(" x = %5.2f y = %5.2f z = %5.2f ",x,y,z); getch(); return 0; }

Related Source Codes

 Script Name Author Moving ball screen saver karlmarx The Classic Game of Snake & Ladder Lakshmi Narayana .A Railway seat reservation question which comes in sapient VyomWorld To calculate percentile Ravi Mathur Send to folder ANIMESH SAHU Analog clock and calendar Nazia & Rida HIGH/LOW GAME MOLLY ARORA Data structure (stack Implimentation) Swapnil B Adsure Memory Game AnirudhSanyal Easy Calc Anirudh Sanyal GK Quiz Anirudh Sanyal Hangman Game Manish Jain Snakeman Manish Jain Full month Calendar Nigi Cursor shapes nigi

A D V E R T I S E M E N T

Subscribe to SourceCodesWorld - Techies Talk
Email:

 Free eBook - Interview Questions: Get over 1,000 Interview Questions in an eBook for free when you join JobsAssist. Just click on the button below to join JobsAssist and you will immediately receive the Free eBook with thousands of Interview Questions in an ebook when you join.

ASP Home | C Home | C++ Home | COBOL Home | Java Home | Pascal Home