首页 > 其他 > 详细

第三次作业

时间:2016-09-11 12:51:10      阅读:161      评论:0      收藏:0      [点我收藏+]

package 排序;

import static org.junit.Assert.*;

import org.junit.Before;
import org.junit.Test;

public class reverseTest {
reverse re = new reverse();
int a[][]=new int[5][5];
@Before
public void setUp() throws Exception {
}

@Test
public void testReverse() {
if(re.reverse(a[2][2])){
for(int x=0;x<a.length;x++){
for(int y=1;y<a[x].length;y++){
if(x!=y){
int t=a[x][y];
a[x][y]=a[y][x];
a[y][x]=t;
}
}
}
System.out.println("you are wrong");

}
else if(re.reverse(a[2][2])){
for(int x=0;x<a.length;x++){
for(int y=x;y<a[x].length;y++){
if(x!=y){
int t=a[x][y];
a[x][y]=a[y][x];
a[y][x]=t;
}
}
}
re.reverse(a);
}
}

}

 技术分享

 

第三次作业

原文:http://www.cnblogs.com/Pinkleopard/p/5861322.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!