资 源 简 介
/* 本程序实现的功能: 显示系统时间和日期 该程序主要操作是: 使用了dos的系统调用功能,输入大小写D显示系统当前日期,当输入大小写T输出当前系统时间,当输入大小写Q退出程序,当输入其他字符时,提示错误 。 主要算法:将系统时间及日期转化成字符显示,通过堆栈来排序显示,同时涉及到 坐标位置设置的转换。时间和日期的显示都只调用了一个(函数)compute,避免了代码的冗余,尽量做到简洁,同时当一次操作过后,程序处于等待状态,以进行下一次操作,而非自动退出。该程序显示时间时多次调用显示功能,以达到动态效果。*/-/* This program features : The display system time and date of the program is the main operation : the use of the system call dos function, importation case-D display the current date, case-insensitive T when the input output current system, when the input Q withdraw from the case-sensitive procedure, when losers in other characters, suggesting error. The main algorithm : the system date and time into the characters, sorting through the stack to show that involves strategically placed to coordinate conversion. The time and date shown only a call (functions) compute avoid code redundancy, make it simple as possible, and at the same time after the operation, the procedure waits for the next operation, rather than retire. The