HW5.4
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的更多相关文章
- HW5.36
import java.util.Scanner; public class Solution { public static void main(String[] args) { Scanner i ...
- HW5.35
import java.util.Scanner; public class Solution { public static void main(String[] args) { Scanner i ...
- HW5.34
import java.util.Scanner; public class Solution { public static void main(String[] args) { Scanner i ...
- HW5.33
import java.util.Calendar; public class Solution { public static void main(String[] args) { long tot ...
- HW5.32
public class Solution { public static void main(String[] args) { int n1 = (int)(Math.random() * 5 + ...
- HW5.31
import java.util.Scanner; public class Solution { public static void main(String[] args) { Scanner i ...
- HW5.30
public class Solution { public static void main(String[] args) { for(int i = 3; i <= 1000; i++) i ...
- HW5.29
public class Solution { public static void main(String[] args) { int n1 = (int)(Math.random() * 5 + ...
- HW5.28
public class Solution { public static void main(String[] args) { System.out.printf("%s\t%s\n&qu ...
- HW5.27
public class Solution { public static void main(String[] args) { int totalCount = 0; int lineCount = ...
随机推荐
- python初准备:安装easy_install和pip
安装easy_install wget http://peak.telecommunity.com/dist/ez_setup.py python ez_setup.py 安装pip wget htt ...
- C#中日期时间的简单操作
(1).比较2个DateTime的大小 DateTime dt1 = Convert.ToDateTime("2010/11/25 20:53:43"); DateTime dt2 ...
- hdu 3572 Task Schedule
Task Schedule 题意:有N个任务,M台机器.每一个任务给S,P,E分别表示该任务的(最早开始)开始时间,持续时间和(最晚)结束时间:问每一个任务是否能在预定的时间区间内完成: 注:每一个任 ...
- websphere6.1安装与配置
http://www.blogjava.net/103335460/articles/220935.html 一.本人开发环境: jdk1.5.0_11 , eclipse3.2 , MyEclips ...
- Source Insight 显示中文乱码
Source Insight 3.X utf8支持插件震撼发布 继上次SI多标签插件之后,因为公司内部编码改为utf8编码,因此特意做了这个Source Insight 3.X utf8插件. 下载地 ...
- java三种工厂模式
适用场合: 7.3 工厂模式的适用场合 创建新对象最简单的办法是使用new关键字和具体类.只有在某些场合下,创建和维护对象工厂所带来的额外复杂性才是物有所值.本节概括了这些场合. 7.3.1 动态实现 ...
- Python之创建tuple
tuple是另一种有序的列表,中文翻译为" 元组 ".tuple 和 list 非常类似,但是,tuple一旦创建完毕,就不能修改了. 同样是表示班里同学的名称,用tuple表示如 ...
- Nhibernate cookbook 3.0-翻译
/* Style Definitions */ table.MsoNormalTable {mso-style-name:普通表格; mso-tstyle-rowband-size:0; mso-ts ...
- nodejs 第一次使用
在win7下安装与使用 1 nodejs官网下载,安装 https://nodejs.org/ 2 下载最新的 npm,在E:\nodejs\中解压 http://nodejs.org/dist/ ...
- Struts2WebUtil
一个简单的实用工具类 package cn.jorcen.commons.util; import javax.servlet.http.HttpServletRequest; import org. ...