Defines the entry point for the console application, C/C++ Programming

Assignment Help:

Defines the entry point for the console application.
//

#include "stdafx.h"
#include
#include
#include"conio.h"
using namespace std;

double Determinant(double a[][3],int forder)
{
    int i,j,k;
    double mult;
    double deter=1.0;
    for(i=0;i    {
        for(j=0;j        {
            mult=a[j][i]/a[i][i];
            for(k=0;k            {
                if(i==j) break;
                a[j][k]=a[j][k]-a[i][k]*mult;
            }
        }
    }
    for(i=0;i    {
        deter=deter*a[i][i];
    }
    return(deter);
}


int chckdgnl(double array[][3],int forder)
{
    int i,j,k;
    for(i=0;i    {
        if(array[i][i]==0)
        {
            for(j=0;j            {
                if(array[i][j]!=0)
                {
                    k=j;
                    break;
                }
                if(j==(forder)) //forder-1
                    return(0);
            }
            for(j=0;j            {
                array[j][i]=array[j][i]-array[j][k];
            }
        }
    }
}

int _tmain(int argc, _TCHAR* argv[])
{
    int order;
    double Returned_detr;
    //double Matrix[7][7]= {

    //    {9,21,64.2,239.4,1001.9664,4462.248,20576.30496},
    //    {21,64.2,239.4,1001.9664,4462.248,20576.30496,96927.19008},
    //    {64.2,239.4,1001.9664,4462.248,20576.30496,96927.19008,463151.20698624},
    //    {239.4,1001.9664,4462.248,20576.30496,96927.19008,463151.20698624,2235757.89959},
    //    {1001.9664,4462.248,20576.30496,96927.19008,463151.20698624,2235757.89959,10874777.1150874},
    //    {4462.248,20576.30496,96927.19008,463151.20698624,2235757.89959,10874777.1150874,53202491.5316966},
    //    {20576.30496,96927.19008,463151.20698624,2235757.89959,10874777.1150874,53202491.5316966,261454882.916371}

    //};
    double Matrix[3][3]=    {
    {2.200, 3.400, 8.000},
    {2.100, 1.000, 7.000},
    {2.900, 3.300, 6.900}

    };
    order = 3;
    if(chckdgnl(Matrix,order)==0)
    {
        Returned_detr = 0;
    }
    else
    {
        Returned_detr = Determinant(Matrix,order);
        cout<<"Determinent Value: "<        
    }
    getch();
}


Related Discussions:- Defines the entry point for the console application

String comparision, how to compare one file with another file. comparison s...

how to compare one file with another file. comparison should be like first line of first file compare every line of second file until it gets a blank line starting from the top and

Stack operations - c++, Stack operations - C++: Write a program to def...

Stack operations - C++: Write a program to define basic stack operations in c++. int Stack::push(int elem) {    int m = getmax();    if (top    {       put_

Luminous jewels, Luminous Jewels - The Polishing Game Byteland county is v...

Luminous Jewels - The Polishing Game Byteland county is very famous for luminous jewels. Luminous jewels are used in making beautiful necklaces. A necklace consists of various lum

Compiler design, Compiler Design - Limit In The Method Instructions

Compiler Design - Limit In The Method Instructions

Arrays, how to declare arrays

how to declare arrays

Binary options ea for directfx and signalpush, Binary Options EA for Direct...

Binary Options EA for DirectFX and SignalPush Project Description: I want a programmer who will build an EA based on my three types of Binary strategy's using two Indicators.

Develop g-code generating software, Develop G-code generating software P...

Develop G-code generating software Project Description: I'm presently using Slicer on a polymer jetting 3d printer. The toolpaths were thought out for FDM printers and thus a

Sentence, Consider text comprised of sentences and sentences comprised of w...

Consider text comprised of sentences and sentences comprised of words. Words in a sentence will be space delimited. Given a text and K strings, task is to find out the number valid

Area of curve, Write a program to find the area under the curve y = f(x) be...

Write a program to find the area under the curve y = f(x) between x = a and x = b, integrate y = f(x) between the limits of a and b. The area under a curve between two points can b

Write a c program as text layout, Your task in this project is to write a C...

Your task in this project is to write a C program named layout.c which does text layout. This is a staged project, complete the stages in order. The maximum mark if you nish each

Write Your Message!

Captcha
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