Make a c program using cramers rule using 3 variables and eq

Assignment Help Basic Computer Science
Reference no: EM13165190

make a C program using cramers rule using 3 variables and 3 equations. I need help why the third variable says it isnt initialized and allow the the determinents to be calculated. also i need help making a menu allowing the user to make a start the program and enter the new variables or to exit the program.

 

This is what i have so far:

#include <stdio.h>

#include<stdlib.h>

int main (void)
{
    int r,c;
    double a[3][3],b[3];
    double x1a, x2a, x3a, x1, x2, x3, d;
    printf("\n Solving for 3 Equations- 3 unknowns\n");

    for (r=0; r<3; r++)
    {
        for (c=0; c<3;c++)
        {
            printf("Enter a [%d][%d]:" ,r,c);
            scanf_s("%lf", &a[r][c]);
        }
d=(a[0][0]*a[1][1]*a[2][2])+(a[0][1]*a[1][2]*a[2][0]) +(a[0][2]*a[1][0]*a[2][1])-(a[0][2]*a[1][1]*a[2][0])-(a[0][0]*a[1][2]*a[2][1])-(a[0][1]*a[1][0]*a[2][2]);

x1a=(b[0]*a[1][1]*a[2][2])+(a[0][1]*a[1][2]*b[2])+(a[0][2]*b[1]*a[2][1])-(a[0][2]*a[1][1]*b[2])-(b[0]*a[1][2]*a[2][1])-(a[0][1]*b[1]*a[2][2]);

x2a=(a[0][0]*b[1]*a[2][2])+(b[0]*a[1][2]*a[2][0]) +(a[0][2]*a[1][0]*b[2])-(a[0][2]*b[1]*a[2][0])-(a[0][0]*a[1][2]*b[2])-(b[0]*a[1][0]*a[2][2]);

x3a=(a[0][0]*a[1][1]*b[2])+(a[0][1]*b[1]*a[2][0])+(b[0]*a[1][0]*a[2][1])-(b[0]*a[1][1]*a[2][0])-(a[0][0]*b[1]*a[2][1])-(a[0][1]*a[1][0]*b[2]);

x1=x1a/d; x2=x2a/d; x3=x3a/d;

printf("\n X1=%lf, X2=%lf, X3=%lf\n",x1,x2,x3);
system("pause");
return 0;
    }}

 

 

Reference no: EM13165190

Questions Cloud

Compute price and quantity materials variances : Compute price, and quantity materials variances for the Tile Company for March. Indicate amount ($) and favorable (F) or unfavorable (U) effects. Price variance
Explain what is the final temperature of the water : What is the final temperature of the water and pieces of metal?
Determine ending inventory under perpetual inventory system : Determine the ending inventory under a perpetual inventory system using (1) FIFO, (2) moving-average cost, and (3) LIFO. the ending inventory under a perpetual inventory system.
Consider the molar mass of nh : You prepared a 0.250 M solution by diluting 8.45(+-0.04)mL of 28.0(+-0.5)mL wt.%NH3 (density=0.899(+-0.003)g/mL up to 500.0(+-0.2)mL. Find the uncertainty in 0.250 M.
Make a c program using cramers rule using 3 variables and eq : make a C program using cramers rule using 3 variables and 3 equations. I need help why the third variable says it isnt initialized and allow the the determinents to be calculated. also i need help making a menu allowing the user to make a start the p..
Topics: user interface, input validation, computer security : Topics: user interface, input validation, computer security, i/o processing, storage & retrievalAssignment: Write a program that will simulate a basic registration/login process for a standard application or website.Menu ItemsCreate a profileAsk the ..
Calculate the molality, molarity : An aqueous antifreeze solution is 40.0% ethylene glycol (C2H6O2) by mass. The density of the solution is 1.05 g/cm3. Calculate the molality, molarity, and mole fraction of the ethylene glycol.
Read the file a line at a time : Write the modified text file with the same name as the original file, but preprended with 'new_'. For instance, if the input filename was 'data.txt', the output filename would be 'new_data.txt'.
What is the molecular weight of the hormone : An aqueous solution containing 21.6 mg of vasopressin in 100.0 mL of solution has an osmotic pressure at 25.0 oC of 3.70 mmHg. What is the molecular weight of the hormone?

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Identifies the cost of computer

identifies the cost of computer components to configure a computer system (including all peripheral devices where needed) for use in one of the following four situations:

  Input devices

Compare how the gestures data is generated and represented for interpretation in each of the following input devices. In your comparison, consider the data formats (radio waves, electrical signal, sound, etc.), device drivers, operating systems suppo..

  Cores on computer systems

Assignment : Cores on Computer Systems:  Differentiate between multiprocessor systems and many-core systems in terms of power efficiency, cost benefit analysis, instructions processing efficiency, and packaging form factors.

  Prepare an annual budget in an excel spreadsheet

Prepare working solutions in Excel that will manage the annual budget

  Write a research paper in relation to a software design

Research paper in relation to a Software Design related topic

  Describe the forest, domain, ou, and trust configuration

Describe the forest, domain, OU, and trust configuration for Bluesky. Include a chart or diagram of the current configuration. Currently Bluesky has a single domain and default OU structure.

  Construct a truth table for the boolean expression

Construct a truth table for the Boolean expressions ABC + A'B'C' ABC + AB'C' + A'B'C' A(BC' + B'C)

  Evaluate the cost of materials

Evaluate the cost of materials

  The marie simulator

Depending on how comfortable you are with using the MARIE simulator after reading

  What is the main advantage of using master pages

What is the main advantage of using master pages. Explain the purpose and advantage of using styles.

  Describe the three fundamental models of distributed systems

Explain the two approaches to packet delivery by the network layer in Distributed Systems. Describe the three fundamental models of Distributed Systems

  Distinguish between caching and buffering

Distinguish between caching and buffering The failure model defines the ways in which failure may occur in order to provide an understanding of the effects of failure. Give one type of failure with a brief description of the failure

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd