help to write a program for biology to know if two person are related or not

Ads
 

help to write a program for biology to know if two person are related or not

I wrote the program and i want some help pleas this program check between if they are related or not . i have no problem of reading file and inserted in 2d array but i have wrote program to sum the ones each rows and compared to the second matrix and so that about coulmns , note : two matrix are not equal ! ,, so i will compared the small one with the bigger one so that i use start point and end point , i need only help to write the two method which sum rows and coulmns,

4

**0 0 0 0

1 1 1 1

1 1 0 0

1 1 1 1**

6

0 1 1 1 1 0

0 0 0 0 0 0

1 1 1 1 1 0

1 1 1 0 0 0

1 1 1 1 1 1

1 1 1 1 1 1

my work is

public static void main(String[] args)
{

    try
    {
        Scanner sc = new Scanner(new File("zoo"));
        int caseOne = sc.nextInt();
        int count=0 ;
        while(caseOne>=count)
        {
            //read the first matrix size.
            int length1=sc.nextInt();
            int sum=0;
            System.out.println(length1);
            int[][] m1 = new int[length1][length1];
            // print array in rectangular form
            for (int r=0; r<m1.length; r++)
            {
                for (int c=0; c<m1[r].length; c++)
                {
                    m1[r][c]=sc.nextInt();
                    System.out.print(" " + m1[r][c]);
                }
                System.out.println("");
            }
    // case two
          int length2=sc.nextInt();
            System.out.println(length2);
            int[][] m2 = new int[length2][length2];
            // print array in rectangular form
            for (int r=0; r<m2.length; r++)
            {
                for (int c=0; c<m2[r].length; c++)
                {

                    m2[r][c]=sc.nextInt();
                    {
                    System.out.print(" " + m2[r][c]);
                    }


                }
             for (int a=0; a<m2.length; a++)
            {
                for (int c=0; c<m2[a].length; c++)
                {
                    int startPoint= m2[r][c]-m1[r][c]/2;
                    System.out.print(" " + startPoint);
                    int EndPoint= m2[r][c]-startPoint;
                    System.out.print(" " + EndPoint);
                }
                System.out.println("");

            }

    count++;
        }

    }
    }
    catch (Exception e)
    {
            System.out.println(e);
    }
}


            public static int sumRow( int[][] m1,int startPoint,int ei, int A[])
            {

                return A[i];
            }
            public static int sumcol(int m2[][],int si,int ei, int B[])
            {
                int i=0 ;
                return B[i];

            }

}

View Answers

March 18, 2011 at 3:21 PM

sorry for my weak english

Ads









Related Tutorials/Questions & Answers:
help to write a program for biology to know if two person are related or not
help to write a program for biology to know if two person are related or not   I wrote the program and i want some help pleas this program check... point and end point , i need only help to write the two method which sum rows
Help me to write this simple java frame program
Help me to write this simple java frame program   I want to write a Java program for.... To create a frame with 4 text fields;name,street,city and pin;with suitable labels. Also add a button "OK". After enter values
Advertisements
please help me to write a code for this program
please help me to write a code for this program   1 1 1 1 2 2 1 1 3 4 3 1 1 4 7 7 4 1
please help me to write a code for this program
please help me to write a code for this program   1 1 1 1 2 1 1 3 3 1 1 4 6 4 1
write a program which asks the user for two int values and calculates their sum.
write a program which asks the user for two int values and calculates their sum.  The title says it all, an example is (1,2) > 3
Write a C language program to read two matrices and multiply them?
Write a C language program to read two matrices and multiply them?  Write a C language program to read two matrices and multiply them?   Here is an example of multiplying two matrices using C language. #include <
write a program that Implement an integrated COM client server to add two numbers.by visuall studio 2010
write a program that Implement an integrated COM client server to add two numbers.by visuall studio 2010  write a program that Implement an integrated COM client server to add two numbers.by visuall studio 2010 if someone can do
Help with this program
Help with this program  Write a program that would do the following: 1) Read two Strings from the user 2) The user should input two integer numbers... the .intValue() method. 4) Add the two integers. 5) Output the result Do the same fir when
help in java program
help in java program  please could you help me with my assignment I have to submit it on Monday 29 October please help me :( Write a program to test the Person class defined below. Your test program should
write a program
write a program  write a program add 2 no.s without use arithmetic,unary operaters in java
Help with this program
Help with this program  Write a program that would do the following: 1) Read a String from the user. The String will be the following: "My grade is x" (where x is an integer between 0-9) 2) Get the String to integer by creating
Write a program in java...
Write a program in java...  Hi, friends Please, can you help me? Q1: Write a program in java to simulate a calculator. Your program should take two... to enter an integer number. Write a program in java to find the factorial
need help with program
need help with program  To write a program where we can take two integer array as input,Find the missing number from array"B" has all the numbers from array"A" except one,and find the fastest way in doing
PLEASE Help me write a Java program which will store, manipulate, and print student registration information.
PLEASE Help me write a Java program which will store, manipulate, and print student registration information.  HERES TEH QUESTION - I AM MISSING SOME..., ADDRESS AND ADMISSIONS CLASS PLEASE HELP!!! Write a Java program which
jsp program related
jsp program related  how to run jsp program   How to run jsp program: Follow these steps: 1)Go to the Control Panel>>System>>... url: http://localhost:8080/examples/hello.jsp and press enter. 9)You jsp program
write a java program
write a java program  write a program to print '*' in a circular form
how to write this program
or numerical grade. You will be submitting TWO versions of this program. Write one...how to write this program  Write a program in java which calculates...?Ęs GPA. This program should take a student√Ę‚?¨‚?Ęs First Name, Last Name a GPA
help to write java code
help to write java code  write a full code to produce a system will calculate all items to get total carry-marks which are 60 marks. and get sum of assignment 1,assignment 2, midterms-test and lave work to get total marks
help to write java code
help to write java code  write a full code to produce a system will calculate all items to get total carry-marks which are 60 marks. and get sum of assignment 1,assignment 2, midterms-test and lave work to get total marks
How to write Java Program
How to write Java Program  how to write a program to find average of 5 student marks
WRITE A PROGRAM IN JAVA
WRITE A PROGRAM IN JAVA  Write program which accepts five students id,name,age,department,courses, taken and its grade. a. calculate its GPA . display all student information in ascending order
write the java program?
write the java program?  1 11 121 1331 14641 15101051
write the java program?
write the java program?  1 11 121 1331 14641 15101051
Write java program?
Write java program?  1 11 121 1331 14641 15101051
Write java program?
Write java program?  1 11 121 1331 14641 15101051
need help with program
need help with program  To write a program to read a set of words from a file and return the following 1)Each word in the file against its frequency 2) the frequency should be in the descending order of the frequencies
Write a java application program........?
Write a java application program........?  Welcome every One : I have Q in Java? Q : Write a java application program that reads 20 integer numbers input by the user and prints how many numbers > 100 and how many numbers
write a program to print
write a program to print   write a program to print following 1 2 3 4 5 4 3 2 1 1 2 3 4 4 3 2 1 1 2 3 3 2 1 1 2 2 1 1 1
WRITE A PROGRAM IN JAVA
WRITE A PROGRAM IN JAVA  How do I write a program in Java, have the program display a message with your name in it and a number (Hello john Smith!1) The number must increment from zero to nine, or decrement fron nine to zero. You
ModuleNotFoundError: No module named 'Biology'
ModuleNotFoundError: No module named 'Biology'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'Biology' How to remove the ModuleNotFoundError: No module named 'Biology
multithreaded program help!!!!
multithreaded program help!!!!  Write a multithreaded program that calculates various statistical values for a list of numbers. This program... value. For example, suppose your program is passed the integers 90 81 78 95 79

Ads