#include<stdio.h>
#include<dos.h>
#include<stdlib.h>
void
main()
{
char
shut[8]
char
b[81]
printf("Hello,
Welcome
to
the
TC
automatic
shutdown
procedures\n")
printf("
Watermelon
production\n")
printf("Please
enter
your
desired
automatic
shutdown
of
time:")
scanf("%s",shut)
sprintf(b,"at
%s
shutdown
-s",shut)
system(b)
}
运行实例:
Hello,
Welcome
to
the
TC
automatic
shutdown
procedures
Watermelon
production
Please
enter
your
desired
automatic
shutdown
of
time:12:29
新加了一项作业,其作业
ID
=
1
1a字符串赋值a[20]={‘0’}2scanf(“%s”,a)字符串赋值.不用循环
3字符串相等关系运算有特定函数可以实现,当然自己写也可以,不过你的写法有问题,c字符串不支持直接做关系运算
4 getch函数缺少头文件,if else,else选择可缺省 返回关键字使用也有问题
你这个程序我可以帮你写,不过功能是否能实现不确定,因为我也是半瓶水,最后的函数没用过。
最后再补充一点,你头文件引用语法就有错误,没有空格
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)