摘要: import java.util.*; class Main { public static void main(String[] args){ Scanner input = new Scanner(System.in); System.out.print("Enter a number as a 阅读全文
posted @ 2022-05-24 17:32 Scenery_Shelley 阅读(54) 评论(0) 推荐(0)
摘要: !到~ import java.util.*; class Main { public static void main(String[] args){ char ch1 = '!'; char ch2 = '~'; int count = 0; for(int i = (int)ch1;i <= 阅读全文
posted @ 2022-05-24 17:02 Scenery_Shelley 阅读(33) 评论(0) 推荐(0)
摘要: 满足n*n < 12 000的最小数 import java.util.*; class Main { public static void main(String[] args){ int n = 1; while(n * n <= 12000){ n++; } System.out.print( 阅读全文
posted @ 2022-05-24 16:51 Scenery_Shelley 阅读(29) 评论(0) 推荐(0)
摘要: 能被5和6整除 import java.util.*; class Main { public static void main(String[] args){ int count = 0; for(int i = 100; i <= 1000; i++){ if(i % 5 == 0 && i % 阅读全文
posted @ 2022-05-24 16:43 Scenery_Shelley 阅读(316) 评论(0) 推荐(0)
摘要: 找出最高分学生和姓名 import java.util.*; class Main { public static void main(String[] args){ Scanner input = new Scanner(System.in); double maxScoreOfStudent = 阅读全文
posted @ 2022-05-24 16:16 Scenery_Shelley 阅读(84) 评论(0) 推荐(0)
摘要: 假设今年某大学的学费为10_000美元,学费的年增长率为5%。 编写程序,计算10年后的学费以及从现在开始的10年后算起,4年内的总学费是多少? import java.util.*; class Main { public static void main(String[] arg){ doubl 阅读全文
posted @ 2022-05-24 15:10 Scenery_Shelley 阅读(81) 评论(0) 推荐(0)