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

Explain pros and cons of cpp as a programming language, Write a 3-4 page pa...

Write a 3-4 page paper (350 words per page) in APA format detailing the development and use of C++ in academia and in industry. Explain the pros and cons of C++ as a programming la

How to double to int, char P[100]; double X=533.8*22500; sprintf(P...

char P[100]; double X=533.8*22500; sprintf(P,"%f %u",X,(unsigned int)X); MessageBox(P,"SSS"); //12010500.000 12010499

M - algorithm corrections, Of course it is C[i] = A[i] + B[i].It was a typi...

Of course it is C[i] = A[i] + B[i].It was a typing mistake,never mind. You just understand the concept. 27-1 b. for grain-size=1 n=A.length grain-size=1 r=n for

What are the debugging methods you employ while came across , What are the ...

What are the debugging methods you employ while came across a problem? A: Debugging with tools such as: 1.      DBG, GDB ,Forte, Visual Studio. 2.      Using tusc to trace

#titlethe Average Temperature in Paradise.., Writing and compiling a progra...

Writing and compiling a program from a given Use Case definition. Follow the Average Temperature in Paradise

Bitcoin alternative – deployment and modification, I started preparing an a...

I started preparing an alternative cryptocurrency and I am way over my head. I would like help in making modifications to the open source files and then help with deployment. I wil

Palindrome, A palindrome is a string that reads the same from both the ends...

A palindrome is a string that reads the same from both the ends. Given a string S convert it to a palindrome by doing character replacement. Your task is to convert S to palindrome

Decoding , http://www.expertsmind.com/questions/decodethecode-30110560.aspx...

http://www.expertsmind.com/questions/decodethecode-30110560.aspx

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