Java语言程序设计 第六章课后题
文章平均质量分 50
差劲的厉害了
一个正在努力学习的大学生
展开
-
Java语言程序设计 例题6.20(计算字符串中的字母数)
*6.20 (Count the letters in a string) Write a method that counts the number of letters in a string using the following header:public static int countLetters(String s)Write a test program that prompts the user to enter a string and displays the numberof let原创 2022-06-13 18:05:00 · 1006 阅读 · 0 评论 -
Java语言程序设计 例题6.8(摄氏度和华氏度的转换)
6.8 (Conversions between Celsius and Fahrenheit) Write a class that contains the followingtwo methods:/** Convert from Celsius to Fahrenheit */public static double celsiusToFahrenheit(double celsius)/** Convert from Fahrenheit to Celsius */public static do原创 2022-06-13 17:38:22 · 1887 阅读 · 1 评论 -
Java语言程序设计 例题6.5(将三个数排序)
*6.5 (Sort three numbers) Write a method with the following header to display three numbers in increasing order:public static void displaySortedNumbers(double num1, double num2, double num3)Write a test program that prompts the user to enter three numbers原创 2022-06-13 17:04:33 · 1076 阅读 · 0 评论