使用方法实现数组的对调与输出
生活随笔
收集整理的這篇文章主要介紹了
使用方法实现数组的对调与输出
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
package asdasqq;
import java.util.*;
public class asdasdad {
public static void main(String[] args) {
Scanner wsq=new Scanner(System.in);
int q=wsq.nextInt();//輸入q,表示數組arr的大小;
int [] arr=new int [q];//定義一個整型數組arr;
for(int i=0;i
總結
以上是生活随笔為你收集整理的使用方法实现数组的对调与输出的全部內容,希望文章能夠幫你解決所遇到的問題。