?? ex5-6.c
字號:
#include <stdio.h>
main() {
struct mepoint {
unsigned char num;
unsigned char name[11];
float score;
} mp[4]={
{1, "1stpoint", 368.78},
{2, "2ndpoint", 134.90},
{3, "3tdpoint", 798.90},
{4, "4thpoint", 436.01}
};
struct mepoint *p;
unsigned char i,temp=0;
float max;
for (max=mp[0].score, i=1;i<4;i++)
if (mp[i].score>max) {
max=mp[i].score; temp=i;
}
p=mp+temp;
printf("\nThe maxmum score: \n");
printf("No.: %bd\nname: %s\nscore: %4.2f\n",
p->num,p->name,p->score);
while(1);
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -