import java.io.*;class ChuangFz { public void reverse(); int std[]=new int[5]; public void reverse(std) { for (int j=4;j>=0;j--) { System.out.print(std[j]); } }}public class Fz { public static void main(String[] args) { int str[]; str=new int[5]; int index=0; for(int d=1;d<=5;d++) { System.out.print("请输入第" +d+ "个整数,共五个"); try { BufferedReader input=new BufferedReader(new InputStreamReader(System.in)); index=Integer.parseInt(input.readLine()); } catch(IOException e) { } str[d-1]=index; } System.out.println("翻转后的结果为:"); ChuangFz s1=new ChuangFz(); s1.reverse(str); }}
添加回答
举报
0/150
提交
取消