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
Related Tutorials/Questions & Answers:
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
Help with this programHelp 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
write a programwrite a program
write a
program add 2 no.s without use arithmetic,unary operaters in java
help in java programhelp 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
Help with this programHelp 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
jsp program relatedjsp
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 need help with programneed
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
help to write java codehelp 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 codehelp 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 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
WRITE A PROGRAM IN JAVAWRITE 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 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 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 - Java Beginnerswrite a program 1.
write a
program that reads a string composed of 6 words then generate and print a word composed of the first letters of the 6 words. Hi friend,
Code to solve the problem :
class FirstLetter
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 need help with programneed
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 PROGRAM IN JAVAWRITE 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
Two Dimensional array programTwo Dimensional array program consider a
two dimensional array of size mn where both mn are greater than 20.derive a function that can be used... and the first become the last.let the
program output elements of the first array
Help with Temperature programHelp with Temperature program I need
help to
write a GUI
program to calculate the temperature. and here is the format
Application that converts...¢ The application should allow the user to make conversions between any
two scales.
Ã
write program - Java Beginnerswrite program
write a java
program that will read the values of matrix A and B give its multiplication in matrix C Hi friend,
Code for Matrix Multiplication :
class MatrixMultiplication{
public static void
Write a java pregram: Help with methodsWrite a java pregram:
Help with methods
Write a Java method that returns the number of days in a year using the following header:
public static int numberOfDaysInAYear (int year)
Write a Java
program that uses your method
write a program in java.write a
program in java. arrange the natural n umber in 5x5 matrix as
21 22 23 24 25
20 7 8 9 10
19 6 1 2 11
18 5 4 3 12
17 16 15 14 13
i at centerd position and remaining arrange in anticlockwise direction.
write following programwrite following program Q1 What is the difference between single...-threading. Explain with examples
Q2
Write a java applet that takes your name through a parameter from the HTML file and displays it
Q3
Write a short note
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
Need help with console program?Need
help with console
program?
Write a console
program that repeatedly prompts the user to enter data until they type done (any case, Upper, Lower, or Mixed).
thanks in advance.
Here is an example that repeatedly
C Program....PLEASE HELPC
Program....PLEASE HELP For this assignment, you are to
write a
program that calculates points along a rhodonea curve,
a.k.a. a mathematical rose..., and pointers.
I am lost and need a little
help starting please
*int fillArray
compile this program and let me know the resolutioncompile this
program and let me
know the resolution class Maxof2...+" is greater than "+i);
}
}
please compile and let me
know the resolution
Hello Friend,
After compiling the code, while running the code, specify
two How to Write a Calculator Program in Java?How to
Write a Calculator
Program in Java?
In this Java Tutorial you will learn how to
write a Calculator
program in Java in easy steps. Calculator
program..., subtraction, multiplication or division.
In this example of writing
program in Java
to write a program to display the employee details..to
write a
program to display the employee details.. To dipslay... running this
program the new window has to be opened asking us to enter all...
not this one actually i wnat a very small
program that displays all