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

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();
}

Posted Date: 2/20/2013 6:43:42 AM | Location : United States







Related Discussions:- Defines the entry point for the console application, Assignment Help, Ask Question on Defines the entry point for the console application, Get Answer, Expert's Help, Defines the entry point for the console application Discussions

Write discussion on Defines the entry point for the console application
Your posts are moderated
Related Questions
A Padovan string P(n) for a natural number n is defined as: P(0) = ‘X’ P(1) = ‘Y’ P(2) = ‘Z’ P(n) = P(n-2) + P(n-3), n>2 where + denotes string concatenation. For a string of t

BACKGROUND: FILE SYSTEMS  In a computer, a file system (sometimes written filesystem) is the way in which files are named and where they are placed logically for storage and ret

Question 1. Explain Briefly about class and objects. 2. Create a class string which stores a string value. Overload ++ operator which converts the characters of the string t

This task involves creating a new class(es) that will allow the system to playback pattern sequences using the Neo  Freerunner  hardware. The first thing to note is that the vibrat

Change the matrix program (program 3) slightly. Overload == operator to compare two matrices to be added or subtracted. i.e., whether the column of first and the row of second

Estimation of the yield curve using nonlinear least squares minimization: The last part of this assignment asks you to construct the Nelson Siegel yield curve from observed bond pr

It is standard on functions to provide some indication that the function has succeeded in its operation. Consider the Scanf function:     scanf("%d",&number1);   If the functio

Reusability  Reusability means reusing code written earlier, may be from some earlier project or from the library. Reusing old code not only saves development time, but also sa

HOW TO USE POINTER

padovan string for natural numbers program in java // aakash , suraj , prem sasi kumar kamaraj college program 1 : package test.padovanstring; public class Padov