以下程序的功能是从在屏幕上显示一张如下所示的菜单: *****Time***** 1 morning 2 afternoon 3 night Please enter your choice: 程序根据输入的时间序号显示相应的问候信息,选择1显示“Good morning”,选择2显示“Good afternoon”,选择3显示“Good night”,其他选择显示“Selection error!” 程序运行示例1: *****time***** 1 morning 2 afternoon 3 night Please enter your choice: 2↙ good afternoon 程序运行示例2: *****time***** 1 morning 2 afternoon 3 night Please enter your choice: 6↙ Selection error! 将下面程序填写完整 #include <stdio.h> void display(); void choice(int x); int main() { int n; _____________; scanf("%d", &n); ____________; return 0; } void display() { printf("*****time*****\n"); printf("1 morning\n"); printf("2 afternoon\n"); printf("3 night\n"); printf("Please enter your choice: "); } void choice(_____________) { switch (x) { case _____________: printf("good morning\n"); break; case _____________: printf("good afternoon\n"); break; case _____________: printf("good night\n"); break; default: printf("Selection error!\n"); } }
A、display() choice(n) int x 1 2 3
B、display() choice(n) int x '1' '2' '3'
C、display(n) choice() int x 1 2 3
D、display(n) choice() int x '1' '2' '3'
请利用本单元及以前所学知识,使用伪类相关知识制作鼠标悬停效果。当鼠标未悬停在超链接上时,显示效果如图A所示,当鼠标悬停在超链接上时,显示效果如图B所示。A图B图 然后,先在WPS文字中添加好源程序、程序运行结果截图及有关说明,并编排好,再转换为PDF文件(WPS的文件菜单中有个“输出为PDF”的功能),在MOOC系统中以附件形式提交作业。
找最值 题目内容: 从键盘任意输入6个整数,用指针变量作函数参数编程计算最大值和最小值,并返回它们所在数组中的位置。函数原型如下所示: int FindMax(int num[], int n, int *pMaxPos);//函数返回最大值,pMaxPos返回最大值所在的下标 int FindMin(int num[], int n, int *pMinPos);//函数返回最小值,pMaxPos返回最小值所在的下标 程序运行结果示例: Input 10 numbers: -1 2 3 45 92 8 9 ↙ Max=92,Position=4,Min=-1,Position=0 输入格式: "%d" 输出格式: 提示信息:"Input 6 numbers:\n" 输出结果:"Max=%d,Position=%d,Min=%d,Position=%d\n"
A.系统正在运行一道程序,这时不能运行其他程序
B.正在运行打印程序
C.没有运行任何程序
D.系统正在运行一道程序,这时还可以运行其他程序
为了保护您的账号安全,请在“简答题”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!