i 绝望

依然

Miss Lang
  2013年11月5日
摘要: 总结:请给我更好的建议package com.badu;import java.util.Scanner;//从键盘输入次数,通过输入的编号,输出对应的的商品价格;public class tqwe { public static void main(String[] args) { Scanner c = new Scanner(System.in); int x = c.nextInt();// x是次数,number是编号,price是价格 int number[] = new int[x]; double price; for (int i = 0; i < x; i++) .. 阅读全文
posted @ 2013-11-05 22:32 juewang 阅读(440) 评论(0) 推荐(0) 编辑
摘要: 总结:总感觉有问题,因为输出我写的太不对劲了,直接把price的价格写了出来然输出显示……package com.badu;import java.util.Scanner;//从键盘输入次数,通过输入的编号,输出对应的的商品价格;public class tqwe { public static void main(String[] args) { Scanner c = new Scanner(System.in); int x = c.nextInt();// x是次数,number是编号,price是价格 int number; double price; for (int ... 阅读全文
posted @ 2013-11-05 22:21 juewang 阅读(1576) 评论(0) 推荐(0) 编辑
摘要: 总结:可以if-else 循环或switch循环package com.b;import java.util.Scanner;/*以下4种水果的单价分别是3.00元/公斤,2.50元/公斤,4.10元/公斤,10.20元/公斤。//输入水果的编号,输出它的单价,若输出不正确的编号,则显示单价为0;[1] apples[2] pears[3] oranges[4] grapes //->*/public class dfhgrr { public static void main(String[] args) { Scanner c=new Scanner(System.in); int 阅读全文
posted @ 2013-11-05 07:47 juewang 阅读(1224) 评论(0) 推荐(0) 编辑
摘要: 总结:数组内的数据要循环,外面的次数也要循环package com.aini;import java.util.Scanner;//要求可以控制输入的次数,比如4次。则输入5个数,5组输出结果public class DFSDFG { public static void main(String[] args) { Scanner c = new Scanner(System.in); int x = c.nextInt(); int a[] = new int[x]; int s = 0; for (int i = 0; i < x; i++) { for (int i1 = ... 阅读全文
posted @ 2013-11-05 00:04 juewang 阅读(373) 评论(0) 推荐(0) 编辑

绝望依然

Miss Lang