91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 2KB
    文件類型: .rar
    金幣: 2
    下載: 0 次
    發(fā)布日期: 2021-05-16
  • 語言: Matlab
  • 標(biāo)簽:

資源簡介

程序可以完成對學(xué)生姓名、課程、分?jǐn)?shù)的錄入,排序和查詢。

資源截圖

代碼片段和文件信息

%簡易學(xué)生成績管理程序
clear
clc
disp(‘--------------------------------歡迎進(jìn)入簡易學(xué)生成績管理系統(tǒng)------------------------------‘);
flag=input(‘-*-*-*-*-*-重新輸入所有信息請輸入1,并開始逐項(xiàng)輸入;使用默認(rèn)值進(jìn)行排序或查詢請輸入2(建議輸入2):-*-*-*-*-*-*-?‘);
??????if?flag==2;
????????student=struct(‘name‘{‘張三‘‘李四‘‘王五‘‘小明‘‘小紅‘}‘number‘{22001?22002?2200322004?22005}‘course1‘‘自控原理?‘...
????????????‘score1‘{88?67?84?8983?}‘course2‘‘高數(shù)?‘‘score2‘{75?5892?78?71?}...
????????????‘course3‘‘電路‘‘score3‘{83798190?85?}‘course4‘‘計(jì)算機(jī)?‘‘score4‘{98?75?83?84?82?});??
??????end
??????if?flag==1;???????????????????????????????????????????%開始輸入信息
????student(1).name=input(‘-*-*-*-請輸入學(xué)生姓名(中英文請用單引號(hào)括住,注意引號(hào)形式,下同):-*-*-*-*-*-?‘);
????student(1).number=input(‘-*-*-*-*-*-*-*-*-請輸入學(xué)號(hào):-*-*-*-*-*-*-*-*-*-??‘);
????student(1).course1=input(‘-*-*-*-*-*-*-*-*請輸入課程1的名稱:-*-*-*-*-*-*-?‘);
????student(1).score1=input(‘-*-*-*-*-*-*-*-*-請輸入課程1的分?jǐn)?shù):-*-*-*-*-*-*-??‘);
????student(1).course2=input(‘-*-*-*-*-*-*-*-*請輸入課程2的名稱:-*-*-*-*-*-*-?‘);
????student(1).score2=input(‘-*-*-*-*-*-*-*-*-請輸入課程2的分?jǐn)?shù):-*-*-*-*-*-*-?‘);
????student(1).course3=input(‘-*-*-*-*-*-*-*-*請輸入課程3的名稱:-*-*-*-*-*-*-??‘);
????student(1).score3=input(‘-*-*-*-*-*-*-*-*-請輸入課程3的分?jǐn)?shù):-*-*-*-*-*-*-‘);
????student(1).course4=input(‘-*-*-*-*-*-*-*-*請輸入課程4的名稱:-*-*-*-*-*-*-??‘);
????student(1).score4=input(‘-*-*-*-*-*-*-*-*-請輸入課程4的分?jǐn)?shù):-*-*-*-*-*-*-?‘);
for?n=2:5
????student(n).course1=student(1).course1;
????student(n).course2=student(1).course2;
????student(n).course3=student(1).course3;
????student(n).course4=student(1).course4;
????student(n).name=input(‘-*-*-*-*-*-*-*-請輸入學(xué)生姓名:-*-*-*-*-*-*-*-?‘);
????student(n).number=input(‘-*-*-*-*-*-*-請輸入學(xué)號(hào):-*-*-*-*-*-*-*-*-*-?‘);
????student(n).score1=input(‘-*-*-*-*-*-*-請輸入課程1得分:-*-*-*-*-*-*-*-?‘);
????student(n).score2=input(‘-*-*-*-*-*-*-請輸入課程2得分:-*-*-*-*-*-*-*-?‘);
????student(n).score3=input(‘-*-*-*-*-*-*-請輸入課程3得分:-*-*-*-*-*-*-*-?‘);
????student(n).score4=input(‘-*-*-*-*-*-*-請輸入課程4得分:-*-*-*-*-*-*-*-?‘);
end
??????end????????????????????????????%輸入信息結(jié)束
??????
??????
disp(‘-*-*-*-*-*-*-*-*-*-*-*-所有信息如下:-*-*-*-*-*-*-*-*-*-*-?‘);
for?n=1:5
????disp(‘學(xué)生‘)disp(n);
????disp(student(n));
end

cha=1;
pai=2;
fflag=input(‘-*-*-*-*-*-*-*-*-進(jìn)入排序或查詢請輸入1,退出輸入0:-*-*-*-*-*-*-*-?‘);
if?fflag==1
flag1=input(‘-*-*-*-*-*-*-*-進(jìn)入排序輸入1,查詢輸入2-*-*-*-*-*-*-*-‘);?
end
while?fflag==1;??
????if?flag1==1||pai==1;
a=input(‘-*-*-*-*-*-*-請選擇排序方式:單科排序輸入1,綜合排序輸入2:-*-*-*-*-*-*-‘);?????????????????????????????????%選擇排序方式???????????
if?a==1
????b=input(‘-*-*-*-*-*-請輸入排序科目:自控原理:輸入1,高數(shù):輸入2,電路:輸入3,計(jì)算機(jī):輸入4:-*-*-*-*-*-*-*-?‘);????????????%選擇排序科目
????switch?b
????????case?1???
????????????disp(student(1).course1);
????????????scores=[student(1).score1student(2).score1student(3).score1student(4).score1student(5).score1]?;????????
?????????????Scores=sort(scores);??????????????????%分?jǐn)?shù)排序
????????????for?m=1:5
????????????????for?n=1:5
????????????????if?student(n).score1==Scores(m)?????????????

?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----

?????文件???????8803??2009-09-07?11:43??title3.m

-----------?---------??----------?-----??----

?????????????????8803????????????????????1


評(píng)論

共有 條評(píng)論