数组逆序输出
来源:互联网 发布:罗素 知乎 数学家 编辑:程序博客网 时间:2024/05/21 12:49
package com.pro3;
public class ArrayInvertedOrder {
/*
* 数组逆序输出
* Array inverted order output
*/
public void swap(int table[]){
int i, j;
int len=table.length;
for (i =0; i<len; i++) {
for (j = 0; j <i; j++) {
//
int temp=table[i];
table[i]=table[j];
table[j]=temp;
}//end for
}//
for(i=0;i<len;i++){
System.out.print(table[i]+" ");
}
}
public static void main(String[] args) {
// TODO Auto-generated method stub
int num[]={1,2,3,13,5,6,7,8,9,10};
ArrayInvertedOrder arr=new ArrayInvertedOrder();
arr.swap(num);
//int inarray[]=new int[10];
//for(int i=0;i<inarray.length)
}
}
- 数组逆序输出(递归)
- 数组逆序输出
- 逆序输出数组元素
- 数组逆序输出20130421
- 数组逆序输出
- 数组逆序输出
- 数组的逆序输出
- 数组逆序输出
- 逆序输出有序数组
- 指针逆序输出数组
- 数组逆序输出元素
- 逆序输出数组元素
- 数组的逆序输出
- 数组逆序输出
- 数组的逆序输出
- 逆序输出数组
- php数组逆序输出
- 将一个数组逆序输出
- 取掉前后空格和中间空格
- 输出数列1,1,2,3,5,8,13,21.... 前二十位
- C语言宏定义取得两数的最大值和最小值--其实你的认为是错的!
- 【Android 开发教程】WebView
- oAuth
- 数组逆序输出
- Android 如何获取系统字体大小
- SQLServer中的uniqueidentifier类型
- 输入n个整数,并且进行降序排序
- Coding前的思考
- 关于Java自增的debug和javap反编译
- Mongodb c Driver 使用实例
- Eclipse 在开发中使用到的快捷键很实用噢(转载)
- vb.net c# 转换