随笔分类 -  编程题

Java语言程序设计-基础篇-第八版-编程练习题
Java语言程序设计-基础篇-第八版-编程练习题-第九章
摘要:package 编程练习题chapter9;import java.util.Scanner;public class Exercise9_1 { public static void main(String[] args) { Scanner input = new Scanner(System.in); System.out.println("Enter a string for SSN: "); String s = input.nextLine(); if (isValidSSN(s)) { ... 阅读全文
posted @ 2013-02-14 22:04 bailun 阅读(2678) 评论(0) 推荐(0)
Java语言程序设计-基础篇-第八版-编程练习题-第八章
摘要:package 编程练习题chapter8;import java.util.GregorianCalendar;public class Exercise8_5 { public static void main(String[] args) { GregorianCalendar calendar = new GregorianCalendar(); System.out.println("Year is " + calendar.get(GregorianCalendar.YEAR)); System.out.println("Month ... 阅读全文
posted @ 2013-02-14 22:02 bailun 阅读(9308) 评论(2) 推荐(0)
Java语言程序设计-基础篇-第八版-编程练习题-第七章
摘要:package 编程练习题chapter7;import java.util.Scanner;public class Exercise7_1 { public static void main(String[] args) { Scanner input = new Scanner(System.in); System.out.print("Enter a 4 by 4 matrix row by row: "); double[][] m = new double[4][4]; for (int i = 0; i < 4; i+... 阅读全文
posted @ 2013-02-14 22:00 bailun 阅读(1991) 评论(15) 推荐(1)
Java语言程序设计-基础篇-第八版-编程练习题-第六章
摘要:1 package 编程练习题chapter6; 2 import java.util.Scanner; 3 public class Exercise6_01Extra { 4 public static void main(String[] args){ 5 Scanner input = new Scanner(System.in); 6 boolean[] isCovered = new boolean[99]; 7 8 int number = input.nextInt(); 9 while... 阅读全文
posted @ 2013-02-03 20:31 bailun 阅读(3778) 评论(0) 推荐(0)
Java语言程序设计-基础篇-第八版-编程练习题-第五章
摘要:1 package 编程练习题chapter5; 2 import java.util.*; //我改了; 3 public class Exercise5_1 { 4 public static void main (String args[]) { 5 Scanner input = new Scanner(System.in); 6 7 System.out.print("Enter a number: "); 8 int number = input.nextInt(); 9 10 ... 阅读全文
posted @ 2013-02-03 20:26 bailun 阅读(3899) 评论(3) 推荐(0)
Java语言程序设计-基础篇-第八版-编程练习题-第三章
摘要:1 package 编程练习题chapter3; 2 import java.util.Scanner; 3 public class Exercise3_1 { 4 public static void main(String[] args){ 5 Scanner input = new Scanner(System.in); 6 System.out.print("Enter a, b, c: "); 7 double a = input.nextDouble(); 8 double b = input.nextDouble(); 9 ... 阅读全文
posted @ 2013-01-23 21:36 bailun 阅读(3209) 评论(1) 推荐(0)
Java语言程序设计-基础篇-第八版-编程练习题-第二章
摘要:public class Exercise2_1 { //将摄氏温度转换为华氏温度。 public static void main(String[] args){ java.util.Scanner input = new java.util.Scanner(System.in); System.out.print("Enter a temperature in Celsius: "); double celsius = input.nextDouble(); double fahrenheit = (9.0 / 5) * c... 阅读全文
posted @ 2013-01-13 23:00 bailun 阅读(3054) 评论(7) 推荐(1)
Java语言程序设计-基础篇-第八版-编程练习题-第一章
摘要:1.1publicclassExercise1_1{publicstaticvoidmain(String[]args){System.out.println("welcometoJava");System.out.println("WelcometoComputerScience");System.out.println("Programmingisfun");} }1.2publicclassExercise1_2{publicstaticvoidmain(String[]args){for(inti=0;i<5;i++) 阅读全文
posted @ 2012-12-22 17:51 bailun 阅读(2387) 评论(1) 推荐(1)