摘要: import java.util.Scanner;public class Main {public static void main(String[]args){ Scanner input=new Scanner(System.in); System.out.println("请输入会员积分"); int vip =input.nextInt(); if (vip>=2000){ if (vip<4000){ System.out.print("八折\n"); }else if(vip>=4000&&vip<. 阅读全文
posted @ 2011-12-19 23:29 馨梦域名主机服务中心 阅读(874) 评论(0) 推荐(0) 编辑
摘要: public class Main {public static void main(String[]args){ Scanner input=new Scanner(System.in); System.out.println("请输入是否为会员(y/n)"); String vip =input.next(); System.out.println("请输入购物金额"); double money=input.nextDouble(); if (vip.equals("y")){ if (money>=200){ Sy... 阅读全文
posted @ 2011-12-14 05:17 馨梦域名主机服务中心 阅读(1085) 评论(0) 推荐(0) 编辑
摘要: import java.util.*;//声明Scanner public class Main {//类型 public static void main(String[]args){//入口Scanner input = new Scanner(System.in);System.out.println("请输入a值");int custNo=input.nextInt();if (custNo>1000&&custNo<2000){ System.out.print("大于1K"); }else if(custNo> 阅读全文
posted @ 2011-12-11 06:31 馨梦域名主机服务中心 阅读(229) 评论(0) 推荐(0) 编辑
摘要: import java.util.*;//声明Scanner public class Main {//类型 public static void main(String[]args){//入口Scanner input = new Scanner(System.in);System.out.println("请输入a值");int custNo=input.nextInt();int baiwei=custNo/100%10;int suiji =(int)(Math.random()*10);if (baiwei==suiji){ System.out.pr... 阅读全文
posted @ 2011-12-11 06:19 馨梦域名主机服务中心 阅读(418) 评论(0) 推荐(0) 编辑
摘要: import java.util.*;//声明Scanner public class Main {//类型 public static void main(String[]args){//入口Scanner input = new Scanner(System.in);System.out.println("请输入a值");int a=input.nextInt();if(a%5==0||a%3==0) { System.out.println(a+"是3或者5的倍数"); }else{ System.out.println("该数字不能被3 阅读全文
posted @ 2011-12-11 05:17 馨梦域名主机服务中心 阅读(214) 评论(0) 推荐(0) 编辑
摘要: import java.util.*;//声明Scannerpublic class Main {//类型 public static void main(String[]args){//入口Scanner input = new Scanner(System.in);System.out.println("请输入a值");int a=input.nextInt();System.out.println("请输入b值");int b=input.nextInt();System.out.println("请输入c值");int c=i 阅读全文
posted @ 2011-12-11 05:03 馨梦域名主机服务中心 阅读(199) 评论(0) 推荐(0) 编辑
摘要: import java.util.*;//声明Scanner public class Hello {//类型 public static void main(String[]args){//入口 Scanner input = new Scanner(System.in);//控制台输入 System.out.println("请输入您的性别:");//输出 String sex = input.next();//输入字符串 (男/女) System.ou... 阅读全文
posted @ 2011-12-07 08:59 馨梦域名主机服务中心 阅读(225) 评论(0) 推荐(0) 编辑
摘要: import java.util.*;//声明Scanner public class Hello {//类型 public static void main(String[]args){//入口 Scanner input = new Scanner(System.in);//控制台输入 System.out.println("请输入您的用户名:");//输出 String userName = input.next();//输入字符串 (用户名) System... 阅读全文
posted @ 2011-12-07 07:54 馨梦域名主机服务中心 阅读(183) 评论(0) 推荐(0) 编辑
摘要: import java.util.Scanner;public class Main{public static void main(String[] args) {System.out.println("请输入会员号");Scanner input=new Scanner(System.in);int custNo=input.nextInt();System.out.println("请输入会员生日");String custBirth=input.next();System.out.println("请输入会员积分");int 阅读全文
posted @ 2011-12-06 06:57 馨梦域名主机服务中心 阅读(405) 评论(0) 推荐(0) 编辑
摘要: 实例二:import java.util.Scanner;public class Main{public static void main(String[] args) {System.out.println("请输入您的java成绩");Scanner input=new Scanner(System.in);int score=input.nextInt();if (score>80) { System.out.println("考得不错!"); } }}判断成绩是否大于80,大于则提示考的不错,小于等于不提示。实例三:import java 阅读全文
posted @ 2011-12-06 05:56 馨梦域名主机服务中心 阅读(229) 评论(0) 推荐(0) 编辑
官方推出免费静态网页空间,适合大企业展示和个人展示类空间。欢迎联系QQ908898668申请。