
package testPackage
import java.io.BufferedReader
import java.io.IOException
import java.io.InputStreamReader
import java.util.HashMap
import java.util.Map
public class Main {
/**
* @param args
*/
public static void main(String[] args)
{
Map<String, String>telBook = new HashMap<String, String>铅困()
String name = ""
String tel = ""
String input = ""
for()
{
try {
System.out.println("选择命令:1、输入电话记录;2、查询枝橘电话薄记录;3、退出")
input = (new BufferedReader(new InputStreamReader(System.in))).readLine()
} catch (IOException e) {
e.printStackTrace()
}
try {
switch(Integer.parseInt(input))
{
case 1:
try {
System.out.print("姓名:")
input = (new BufferedReader(new InputStreamReader(System.in))).readLine()
name = input
System.out.print("电话:")
input = (new BufferedReader(new InputStreamReader(System.in))).readLine()
tel = input
} catch (IOException e) {
e.printStackTrace()
}
try {
telBook.put(name, tel)
} catch (RuntimeException e) {
e.printStackTrace()
}
break
case 2:
try {
System.out.print("姓名:")
input = (new BufferedReader(new InputStreamReader(System.in))).readLine()
System.out.println(input + "的电话号码是:" + (String)(telBook.get(input)))
} catch (IOException e) {
e.printStackTrace()
}
break
case 3:
System.out.print("谢谢使用!")
System.exit(0)
break
default: break
}
} catch (Exception e) {
System.out.println("请输入正确的选择项!")
}
}
}
}
无聊之作……
a=inputbox("纯派请输做帆贺入时间","提示")if a="" then exit sub
b=iif(a<3,0.5,(a-3)*0.15+0.5)
if hour(time)<7 or hour(time)>19 then b=b/2
msgbox "话费为:"轿猛 &b
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)