摘要: const readline = require("readline-sync"); console.log("请输入一个年份:"); let year = readline.question()-0; while (isNaN(year) || year 2018) { console.log("年份输入有误"); year = readline.question()-0; ... 阅读全文
posted @ 2018-05-20 16:44 爱吃鱼的猫# 阅读(1157) 评论(1) 推荐(0)
摘要: //方法三:从1到num之间的数字中,寻找能被num整除的数字,找到计1次次数,最终次数如果为2,num是质数,否则不是质数 阅读全文
posted @ 2018-05-20 16:42 爱吃鱼的猫# 阅读(1147) 评论(0) 推荐(0)
摘要: const readline = require("readline-sync"); let time = 0; //输密码次数 let x = 1; //临时变量 console.log("请输入您的密码"); let password = readline.question() - 0; while (password != 123456) { console.log("您输入的密码... 阅读全文
posted @ 2018-05-20 16:26 爱吃鱼的猫# 阅读(562) 评论(0) 推荐(0)