tnfh.net
当前位置:首页 >> JAVA问题:输入10个整数,逆序输出他们? >>

JAVA问题:输入10个整数,逆序输出他们?

import java.util.Scanner; public class test1 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a[] = new int [10]; for(int i=0;i=0;j-- ){ System.out.print(a[j]+" "); } } } 这个应该是你要的吧

import java.util.Scanner; public class test1 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a[] = new int [10]; for(int i=0;i=0;j-- ){ System.out.print(a[j]+" "); } } } 这个应该是你要的吧

import java.util.Scanner;public class Demo001 {public static void main(String[] args) {System.out.println("请输入10个数,以空格隔开:");Scanner scaner = new Scanner(System.in);String strInput = scaner.nextLine();String a[] = st...

import java.io.*; import java.util.*; public class A { public static void main(String[] args) throws NumberFormatException, IOException { int[] num=new int[10]; BufferedReader br=new BufferedReader(new InputStreamReader(System....

public static void main(String []args){ Scanner in=new Scanner(System.in); int n=in.nextInt(); while(n!=0){ System.out.print(n%10); n/=10; }}

import java.util.Scanner;public class Array {public static void main(String[] args) {Scanner scanner = new Scanner(System.in);int [] a = new int[10];int count = 0;System.out.println("请输入10个整数");while (true) {if(scanner.ha...

//不要全部粘贴复制,这个你应该明白,包名和类名都不一样的package 作业;import java.io.BufferedReader;import java.io.IOException;import java.io.InputStreamReader;public class Demo { public static void main(String[] args) { // TODO...

public static void main(String[] args) { System.out.println("请输入3位的整数"); Scanner in = new Scanner(System.in); int cr = in.nextInt(); int b = cr / 100; int s = cr / 10 %10; int g = cr % 10; System.out.println("倒序:"+g+"...

public class Demo { public static void main(String[] args) { Scanner sc=new Scanner(System.in); int[] num=new int[10]; for(int i=0;i

网站首页 | 网站地图
All rights reserved Powered by www.tnfh.net
copyright ©right 2010-2021。
内容来自网络,如有侵犯请联系客服。zhit325@qq.com