import java.util.Scanner;

 public class Solution
 {
     public static void main(String[] args)
     {
         Scanner input = new Scanner(System.in);
         System.out.print("Enter a number: ");
         int number = input.nextInt();

         input.close();

         reverse(number);
     }

     public static void reverse(int number)
     {
         if(number < 10)
             System.out.print(number);
         else
         {
             System.out.print(number % 10);
             reverse(number / 10);
         }
     }
 }

HW5.4的更多相关文章

  1. HW5.36

    import java.util.Scanner; public class Solution { public static void main(String[] args) { Scanner i ...

  2. HW5.35

    import java.util.Scanner; public class Solution { public static void main(String[] args) { Scanner i ...

  3. HW5.34

    import java.util.Scanner; public class Solution { public static void main(String[] args) { Scanner i ...

  4. HW5.33

    import java.util.Calendar; public class Solution { public static void main(String[] args) { long tot ...

  5. HW5.32

    public class Solution { public static void main(String[] args) { int n1 = (int)(Math.random() * 5 + ...

  6. HW5.31

    import java.util.Scanner; public class Solution { public static void main(String[] args) { Scanner i ...

  7. HW5.30

    public class Solution { public static void main(String[] args) { for(int i = 3; i <= 1000; i++) i ...

  8. HW5.29

    public class Solution { public static void main(String[] args) { int n1 = (int)(Math.random() * 5 + ...

  9. HW5.28

    public class Solution { public static void main(String[] args) { System.out.printf("%s\t%s\n&qu ...

  10. HW5.27

    public class Solution { public static void main(String[] args) { int totalCount = 0; int lineCount = ...

随机推荐

  1. HBASE的安装

    HBASE的安装: 安装的软件版本:hbase-0.98.4-hadoop2.tar.gz 下载链接:http://www.apache.org/dist/hbase/hbase-0.98.4/ 1. ...

  2. js中的ajax的运用

    XMLHttpRequest对象 IE7+,FireFox,Chrome,Opera,Safari创建XHR对象: var xhr=new XMLHttpRequest(); 创建XHR对象的兼容性写 ...

  3. [转载]MongoDB 常用命令

    mongodb由C++编写,其名字来自humongous这个单词的中间部分,从名字可见其野心所在就是海量数据的处理.关于它的一个最简洁描述为:scalable, high-performance, o ...

  4. How to steal any developer's local database

    原文链接: http://bouk.co/blog/hacking-developers/ If you’re reading this and you’re a software developer ...

  5. ZOJ 2110 Tempter of the Bone(DFS)

    点我看题目 题意 : 一个N×M的迷宫,D是门的位置,门会在第T秒开启,而开启时间小于1秒,问能否在T秒的时候到达门的位置,如果能输出YES,否则NO. 思路 :DFS一下就可以,不过要注意下一终止条 ...

  6. Windows server 2008下开启telnet功能

    今天在windows server 2008 R2下使用telnet 来测试端口是否可以连接,结果发现如下错误:

  7. [Gauss]POJ1222 EXTENDED LIGHTS OUT

    题意:给一个5*6的矩阵 1代表该位置的灯亮着, 0代表该位置的灯没亮 按某个位置的开关,可以同时改变 该位置 以及 该位置上方.下方.左方.右方, 共五个位置的灯的开.关(1->0, 0-&g ...

  8. MyEclipse中文乱码,编码格式设置,文件编码格式 总结

    一.设置新建常见文件的默认编码格式,也就是文件保存的格式.在不对MyEclipse进行设置的时候,默认保存文件的编码,一般跟简体中文操作系统(如windows2000,windowsXP)的编码一致, ...

  9. jquery data方法

    jquery.data()文档:http://api.jquery.com/jQuery.data/ html5有个data-*属性,跟这个功能一样. Note: This is a low-leve ...

  10. Item Import: What Does "Sync" Items Do? (Doc ID 417887.1)

    In this Document Goal Solution APPLIES TO: Oracle Item Master - Version 11.5.10.0 to 11.5.10.0 [Rele ...