一、按健功能
菜单键:呼出系统功能菜单,或是软件功能菜单
Home键:主要是返回主页使用,以及直看近期任务
返回键:主要用于返回上一级
音量键:用于控制音且加减
电源键:控制开关机,以及映醒熄灭屏幕
二、快捷组合键功能
1.锁屏状态下
①『菜单键+音量上』:将屏幕亮度瞬间调至最大
②『菜单键+音量下』:同时按住可进行截屏
③『返回键+音量上』:同时按下3秒。无锁屏密码时,可快速解锁有锁屏密码时,跳专到锁屏密码界面
④锁屏状态下。长按『home键』可打开手电筒,按一下电源健可关闭
⑤『电源键+音量下』:同时技住也可截屏哟
⑥锁屏时长按『返回键』拍照。设置方法:设置→按键→开启长按返回键拍照
2.解锁状态下
①『菜单键+音量上』:将屏幕亮度瞬间调至最大
②『菜单键+音量下』:同时按住截屏
③『电源键+音量下』:同时按住也可截屏哟
④『长技rHome键』:可d出近期任务.清理后台
⑤长按『返回键』:运行程序时,可强制停止程序并退出至桌面。设置方法:设置一按键一返回键一停止当前程序
3.关机状态下
①关机悄况下。同时按『电源键+音量上』可进入工厂模式,进行硬件检测等
②关机下.同时按,『电源键』+『音量下』可进入Recovery界面
#include <stdio.h>#include <string.h>
struct discussion_record
{
int record_ID
char student_ID[20]
char name[20]
int age
int reply_number
char topic[20]
}discussion_record[20]
void statistic()
{
int e,f
int g[20]={0}
int h[20]={0}
printf("\n[Statistic]\n")
for(e=0e<20e++)
{
if(g[e]==0)
{
for(f=ef<20f++)
{
if(strcmp(discussion_record [e].student_ID,discussion_record[f].student_ID)==0)
{
g[e]++
h[f]=1
}
}
printf("%s %d\n",discussion_record[e].name,g [e])
}
}
}
void main()
{
char print_character=0
int i = 0
printf("a=Printing All Discussion Records\nb=Retrieval of Discussion Record\nc=Sorting and Saving Discussion Records\nd=Maintenance od Discussion Records\ne=Statistic of Student's Discussion\nf=Exit\n")
scanf("%c\n",&print_character)
FILE *fp
fp=fopen("/rhome5/en/09822583d/discussion_record.txt","rb")
for(i=0i<20i++)
{
fscanf(fp,"%d %s %s %d %d\n",&(discussion_record [i].record_ID),
(char*)&(discussion_record[i].student_ID),(char*)&(discussion_record [i].name),
&discussion_record[i].age,&discussion_record [i].reply_number)
}
switch(print_character)
{
case 'a':
{
int j = 0
for(j=1j<=20j++)
{
printf("%d %4s %5s %d %d\n",discussion_record[j].record_ID,
(char*)(discussion_record[j].student_ID),(char*)(discussion_record[j].name),
discussion_record[j].age,discussion_record[j].reply_number)
}
break
}
case 'b':
{
int a
scanf("%d",&a)
a=a-1
printf("%d %4s %5s %d %d\n",discussion_record[a].record_ID,
(char*)(discussion_record [a]).student_ID,(char*)(discussion_record[a].name),
discussion_record [a].age,discussion_record[a].reply_number)
break
}
case 'c':
{
int d
scanf("%d\n",&d)
d=d-1
printf("%d\n",discussion_record [d].reply_number)
scanf("%d\n",&(discussion_record [d].reply_number))
printf("the reply number has been changed into %d\n",discussion_record[d].reply_number)
fclose(fp)
break
}
case 'd':
{
int temp
for (i=0i<20i++)
{
if (discussion_record [i].reply_number<=discussion_record[i+1].reply_number)
{
temp=discussion_record[i].reply_number
discussion_record[i].reply_number=discussion_record[i+1].reply_number
discussion_record[i+1].reply_number=temp
}
}
for(i=0i<20i++)
printf("%d %4s %5s %d %d\n",discussion_record[i].record_ID,
(char*)(discussion_record [i].student_ID),(char*)(discussion_record[i].name),
discussion_record [i].age,discussion_record[i].reply_number)
break
}
case 'e':
statistic()
default:
break
}
}
一复制格式都乱掉了, 这个在GCC下编译通过了(注意, 只是编译通过, 至于逻辑对不对不知道)
还有, 一个地方应该是写错了,感觉原意应该不是那样, main()函数中的第一个for()循环后多了一个分号,那样就成了个空的循环了...
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)