摘要: /*公用*/ body { font-size:15px; padding:0; margin:0; font-family: "SamsungSharpSans","Microsoft Yahei","微软雅黑","Simsun","宋体",arial; background:#f0f0f0 no 阅读全文
posted @ 2020-09-03 23:42 in2013 阅读(215) 评论(0) 推荐(1) 编辑
摘要: 编写一个程序,读人10 个数并且显示互不相同的数(即一个数出现多次,但仅显示一次)。(提示,读人一个数,如果它是一个新数,则将它存储在数组中。如果该数已经在数组中,则忽略它。)输入之后,数组包含的都是不同的数。下面是这个程序的运行示例: Write a program that reads in t 阅读全文
posted @ 2020-07-06 23:57 in2013 阅读(376) 评论(0) 推荐(0) 编辑
摘要: 编写一个程序,读人个数不确定的考试分数,并且判断有多少个分数是大于或等于平均分,多少个分数是低于平均分的。输人一个负数表示输入的结束。假设最高分为100。 Write a program that reads an unspecified number of scores and determine 阅读全文
posted @ 2020-07-05 00:25 in2013 阅读(312) 评论(0) 推荐(0) 编辑
摘要: 编写程序,读取在1到100 之间的整数,然后计算每个数出现的次数。假定输入是以0 结束的。 下面是这个程序的一个运行示例: Write a program that reads the integers between 1and 100 and counts the occurrences of e 阅读全文
posted @ 2020-07-03 20:24 in2013 阅读(527) 评论(0) 推荐(0) 编辑
摘要: 编写程序,读取10 个整数,然后按照和读入顺序相反的顺序将它们显示出来。 Write a program that reads ten integers and displays them in the reverse of the order in which they were read. // 阅读全文
posted @ 2020-06-18 16:23 in2013 阅读(272) 评论(0) 推荐(0) 编辑
摘要: (指定等级)编写一个程序,读入学生成绩,获取最髙分best, 然后根据下面的规则陚等级值 • 如果分数>=best-10, 等级为A • 如果分数>=best-20, 等级为B • 如果分数>=best-30, 等级为C • 如果分数>=卜68140, 等级为D • 其他情况下,等级为F 程序提示用 阅读全文
posted @ 2020-06-12 16:24 in2013 阅读(347) 评论(0) 推荐(0) 编辑
摘要: 6.39(几何:点的位置)编程练习题3.32显示如何测试一个点是否在一个有向直线的左侧、右侧,或在该直线上。使用下面的方法头编写该方法: public static boolean leftOfTheLine(double x0, double y0, double x1, double y1, d 阅读全文
posted @ 2020-06-12 03:39 in2013 阅读(262) 评论(0) 推荐(0) 编辑
摘要: *6.38(生成随机字符)使用程序清单6-10RandomCharacter中的方法,打印100个大写字母及100个一位数字,每行打印10个。 *6.38(Generate random characters) Use the methods in RandomCharacter in Listin 阅读全文
posted @ 2020-06-02 00:00 in2013 阅读(242) 评论(0) 推荐(0) 编辑
摘要: C:\Java\IdeaProjects\java>java xxxx 错误: 找不到或无法加载主类 xxxx 检查java在Idea终端中是否可用,如不可用,编辑编译器输出路径:文件→项目结构→模块→路径→输出目录 或 设置→工具→终端→项目设置→环境变量 // https://cn.fankui 阅读全文
posted @ 2020-05-27 16:37 in2013 阅读(1893) 评论(0) 推荐(0) 编辑
摘要: 6.37(格式化整数)使用下面的方法头编写一个方法,用于将整数格式化为指定宽度: public static String format(int number, int width) 方法为数字number返回一个带有一个或多个以0作为前缀的字符串。字符串的位数就是宽度。比如,format(34,4 阅读全文
posted @ 2020-05-26 22:18 in2013 阅读(251) 评论(0) 推荐(0) 编辑