日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

c语言大作业旋转,c语言大作业全-20210412035629.docx-原创力文档

發布時間:2023/12/15 编程问答 26 豆豆
生活随笔 收集整理的這篇文章主要介紹了 c语言大作业旋转,c语言大作业全-20210412035629.docx-原创力文档 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

Document number:PBGCG-0857-BTDO-0089-PTT1998

Document number:PBGCG-0857-BTDO-0089-PTT1998

C語言大作業全

#include ""

#include ""

#include ""

#include ""

#include ""

#define LEN sizeof(struct student)

#define NULL 0

int n,m;

int k=1;

struct student

{char num[20];

char name[20];

int age;

char profession[50];

int maths;

int english;

int C_program;

float ave;

struct student * next;

};

float ave(struct student * p1)

{

float ave;

ave=(float)(p1->maths+p1->english+p1->C_program)/3;

return ave;

}

void save(struct student *head)

{

struct student *p1 = head;

FILE *outFile;

outFile = fopen("", "wb");

if (outFile == NULL) {

printf("\nFile error.");

}

else {

while(p1 != NULL)

{

fwrite(p1, sizeof(struct student), 1, outFile);

p1 = p1->next;

}

fclose(outFile);

}

}

;

}

else {

head = (struct student *)malloc(sizeof(struct student));

fread(head, sizeof(*head), 1, infile);

p2 = head;

while(fread(&record, sizeof(record), 1, infile));

}

fwrite(p1, sizeof(struct student), 1, outFile);

fclose(outFile);

}

void sta(struct student * head,char array[20],int max,int min)

{

struct student *p1=head;

int k=0;

if(strcmp(array,"maths")==0)

{

while(p1!=NULL)

{

if(p1->maths>=min&&p1->maths<=max)

k++;

p1=p1->next;

}

printf("數學科目在%d到%d之間的人數為:%d\n",min,max,k);

}

else if(strcmp(array,"english")==0)

{

while(p1!=NULL)

{

if(p1->english>=min&&p1->english<=max)

k++;

p1=p1->next;

}

printf("英語科目在%d到%d之間的人數為:%d\n",min,max,k);

}

else if(strcmp(array,"C_program")==0)

{

while(p1!=NULL)

{

if(p1->C_program>=min&&p1->C_program<=max)

k++;

p1=p1->next;

}

printf("C語言科目在%d到%d之間的人數為:%d\n",min,max,k);

}

}

void exit()

{

printf("\t\t");printf("**********************\n");

printf("\t\t");printf("*******感謝使用*******\n");

printf("\t\t");printf("**********************\n");

k=0;

}

void Chooseproject(int i)

{ struct student *

總結

以上是生活随笔為你收集整理的c语言大作业旋转,c语言大作业全-20210412035629.docx-原创力文档的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。