首页 >5hhhhh / 正文
[uploadedimage:19899696]
#include <stdio.h>
#include <stdlib.h>
//函数声明
int grade,gender,course; //年级,性别,选课
int rank,rankm,rankf,changed,changednum; //排名,前面男生,前面女生,进退步,进退步名次
int score,liberalscore,sciencescore; //惩罚分数计算:分数,文科,理科
int chinese, math, english, physics, chemistry, biology, politics, history, geography; //学科
int check; //验证
int main()
{
printf("欢迎使用体罚高中分数计算系统\n");
//输入基本信息
printf("年级(1/2/3): ");
scanf("%d", &grade);
if (grade>1){
printf("选课情况 文科(1)/理科(2):");
scanf("%d", &course);
}
printf("性别 女(1)/男(2): ");
scanf("%d", &gender);
//输入各科成绩
printf("请输入语文成绩: ");
scanf("%d", &chinese);
printf("请输入数学成绩: ");
scanf("%d", &math);
printf("请输入英语成绩: ");
scanf("%d", &english);
if (grade==1){
course==0;
printf("请输入物理成绩: ");
scanf("%d", &physics);
printf("请输入化学成绩: ");
scanf("%d", &chemistry);
printf("请输入生物成绩: ");
scanf("%d", &biology);
printf("请输入政治成绩: ");
scanf("%d", &politics);
printf("请输入历史成绩: ");
scanf("%d", &history);
printf("请输入地理成绩: ");
scanf("%d", &geography);
}
if (course==1){
printf("请输入政治成绩: ");
scanf("%d", &politics);
printf("请输入历史成绩: ");
scanf("%d", &history);
printf("请输入地理成绩: ");
scanf("%d", &geography);
}
else if (course==2){
printf("请输入物理成绩: ");
scanf("%d", &physics);
printf("请输入化学成绩: ");
scanf("%d", &chemistry);
printf("请输入生物成绩: ");
scanf("%d", &biology);
}
//排名
//printf("请输入本次考试排名( ): ");
//scanf("%d", &rank);
printf("排在你前面的男生有( ): ");
scanf("%d", &rankm);
printf("排在你前面的女生有( ): ");
scanf("%d", &rankf);
printf("您本次考试的排名变化为:进步(1)/退步(2),排名变化数为( ) \n");
scanf("%d%d", &changed,&changednum);
//验证学科成绩有效性
do
{
check==0;
if (chinese>150) {printf("您的语文成绩可能无效,请重新输入:\n");
printf("请输入语文成绩: ");
scanf("%d", &chinese);
check==1;
}
if (math>150) {printf("您的数学成绩可能无效,请重新输入:\n");
printf("请输入数学成绩: ");
scanf("%d", &math);
check==1;
}
if (english>150) {printf("您的英语成绩可能无效,请重新输入:\n");
printf("请输入英语成绩: ");
scanf("%d", &english);
check==1;
}
if (physics>100) {printf("您的物理成绩可能无效,请重新输入:\n");
printf("请输入物理成绩: ");
scanf("%d", &physics);
check==1;
}
if (chemistry>100) {printf("您的化学成绩可能无效,请重新输入:\n");
printf("请输入化学成绩: ");
scanf("%d", &chemistry);
check==1;
}
if (biology>100) {printf("您的生物成绩可能无效,请重新输入:\n");
printf("请输入生物成绩: ");
scanf("%d", &biology);
check==1;
}
if (politics>100) {printf("您的政治成绩可能无效,请重新输入:\n");
printf("请输入政治成绩: ");
scanf("%d", &politics);
check==1;
}
if (history>100) {printf("您的历史成绩可能无效,请重新输入:\n");
printf("请输入历史成绩: ");
scanf("%d", &history);
check==1;
}
if (geography>100) {printf("您的地理成绩可能无效,请重新输入:\n");
printf("请输入地理成绩: ");
scanf("%d", &geography);
check==1;
}
}while(check==1);
//计算学科体罚分数
if (chinese>=135) {score=score+(150-chinese);} //语文
else if (chinese>=125) {score=score+(150-chinese)*2;}
else if (chinese>=110) {score=score+(150-chinese)*3;}
else if (chinese>=90) {score=score+(150-chinese)*4;}
else if (chinese<90) {score=score+(150-chinese)*5;}
if (math>=140) {score=score+(150-math);} //数学
else if (math>=130) {score=score+(150-math)*2;}
else if (math>=120) {score=score+(150-math)*3;}
else if (math>=110) {score=score+(150-math)*4;}
else if (math<100) {score=score+(150-math)*5;}
if (english>=145) {score=score+(150-english);} //英语
else if (english>=135) {score=score+(150-english)*2;}
else if (english>=120) {score=score+(150-english)*3;}
else if (english>=105) {score=score+(150-english)*4;}
else if (english<105) {score=score+(150-english)*5;}
if (physics>=90) {sciencescore=sciencescore+(100-physics);} //物理
else if (physics>=80) {sciencescore=sciencescore+(100-physics)*2;}
else if (physics>=70) {sciencescore=sciencescore+(100-physics)*3;}
else if (physics>=60) {sciencescore=sciencescore+(100-physics)*4;}
else if (physics<60) {sciencescore=sciencescore+(100-physics)*5;}
if (chemistry>=90) {sciencescore=sciencescore+(100-chemistry);} //化学
else if (chemistry>=80) {sciencescore=sciencescore+(100-chemistry)*2;}
else if (chemistry>=70) {sciencescore=sciencescore+(100-chemistry)*3;}
else if (chemistry>=60) {sciencescore=sciencescore+(100-chemistry)*4;}
else if (chemistry<60) {sciencescore=sciencescore+(100-chemistry)*5;}
if (biology>=90) {sciencescore=sciencescore+(100-biology);} //生物
else if (biology>=80) {sciencescore=sciencescore+(100-biology)*2;}
else if (biology>=70) {sciencescore=sciencescore+(100-biology)*3;}
else if (biology>=60) {sciencescore=sciencescore+(100-biology)*4;}
else if (biology<60) {sciencescore=sciencescore+(100-biology)*5;}
if (politics>=90) {liberalscore=liberalscore+(100-politics);} //政治
else if (politics>=80) {liberalscore=liberalscore+(100-politics)*2;}
else if (politics>=70) {liberalscore=liberalscore+(100-politics)*3;}
else if (politics>=60) {liberalscore=liberalscore+(100-politics)*4;}
else if (politics<60) {liberalscore=liberalscore+(100-politics)*5;}
if (history>=90) {liberalscore=liberalscore+(100-history);} //历史
else if (history>=80) {liberalscore=liberalscore+(100-history)*2;}
else if (history>=70) {liberalscore=liberalscore+(100-history)*3;}
else if (history>=60) {liberalscore=liberalscore+(100-history)*4;}
else if (history<60) {liberalscore=liberalscore+(100-history)*5;}
if (geography>=90) {liberalscore=liberalscore+(100-geography);} //地理
else if (geography>=80) {liberalscore=liberalscore+(100-geography)*2;}
else if (geography>=70) {liberalscore=liberalscore+(100-geography)*3;}
else if (geography>=60) {liberalscore=liberalscore+(100-geography)*4;}
else if (geography<60) {liberalscore=liberalscore+(100-geography)*5;}
if (grade==1){score=score+(sciencescore+liberalscore)*0.7;} //高一给分
if (course==1){score=score+liberalscore*1.3;} //文科给分
else if (course==2){score=score+sciencescore*1.3;} //理科给分
if (gender==2){score=score*0.2;} //男生成绩分
if (gender==1){score=score+rankm+rankf*0.4;} //女生排名加权
else if (gender==2){score=score+rankm*0.2;} //男生排名加权
if (changed==1){ //进步
if (changednum>=300){score=score*0.6;printf("进步很大,恭喜\n");}
else if (changednum>=200){score=score*0.8;printf("有所进步,请继续保持\n");}
else if (changednum>=100){score=score*0.9;printf("有所进步,不错\n");}
else {printf("有所进步,再接再厉\n");}
}else if (changed==2){ //退步
if (changednum>=300){score=score*1.3;printf("退步很大,严厉批评\n");}
else if (changednum>=200){score=score*1.2;printf("有所退步,好好反思\n");}
else if (changednum>=100){score=score*1.1;printf("有所退步,继续调整\n");}
else {printf("有所退步,再加把劲\n");}
}
//成绩确认
printf("您参与体罚计算的科目成绩为\n");
printf("语文%d\n数学%d\n英语%d\n物理%d\n化学%d\n生物%d\n政治%d\n历史%d\n地理%d\n",chinese,math,english,physics,chemistry,biology,politics,history,geography);
printf("您的体罚分数为 :%d",score);
printf("\n");
if (score>=1800) {printf("您的体罚等级为 S\n");} //体罚等级显示
else if (score>=1400) {printf("您的体罚等级为 F\n");}
else if (score>=1000) {printf("您的体罚等级为 E\n");}
else if (score>=700) {printf("您的体罚等级为 D\n");}
else if (score>=400) {printf("您的体罚等级为 C\n");}
else if (score>=200) {printf("您的体罚等级为 B\n");}
else if (score>=100) {printf("您的体罚等级为 A\n");}
else if (score<100) {printf("您的体罚等级为 A+\n");}
system("pause");
return 0;
}
猜你喜欢
- 2025-09-06 《Extra of Red Dragon:Первокурсник(红龙番外:新生)》,1
- 2025-09-06 《Extra of Red Dragon:Первокурсник(红龙番外:新生)》,2
- 2025-09-06 《Extra of Red Dragon:Уничтожение(红龙番外:毁灭)》
- 2025-09-06 《Extra of Red Dragon:Il conflitto iniziò(红龙番外:冲突开始)》
- 2025-09-06 就活失败组(3)S1E9
- 2025-09-06 《Extra of Red Dragon:Размышлять(红龙番外:思索)》
- 2025-09-06 《Extra of Rea Dragon:Luce persa(红龙番外:逝去的光)》
- 2025-09-06 Chapter 3 / BB-2(羞耻、窥探、童话故事)
- 2025-09-06 《Extra of Red Dragon:Знать врага - значит всегда побеждать(红龙番外:知己知彼百战百胜)》
- 2025-09-06 叛逆的凌辱·中篇,1
- 搜索
-
- 8310℃《Extra of Red Dragon:Первокурсник(红龙番外:新生)》,1
- 2030℃《Extra of Red Dragon:Первокурсник(红龙番外:新生)》,2
- 6340℃《Extra of Red Dragon:Уничтожение(红龙番外:毁灭)》
- 4120℃《Extra of Red Dragon:Il conflitto iniziò(红龙番外:冲突开始)》
- 4330℃就活失败组(3)S1E9
- 7320℃《Extra of Red Dragon:Размышлять(红龙番外:思索)》
- 2350℃《Extra of Rea Dragon:Luce persa(红龙番外:逝去的光)》
- 7490℃Chapter 3 / BB-2(羞耻、窥探、童话故事)
- 8400℃《Extra of Red Dragon:Знать врага - значит всегда побеждать(红龙番外:知己知彼百战百胜)》
- 5990℃叛逆的凌辱·中篇,1
- 09-06《Extra of Red Dragon:Первокурсник(红龙番外:新生)》,1
- 09-06《Extra of Red Dragon:Первокурсник(红龙番外:新生)》,2
- 09-06《Extra of Red Dragon:Уничтожение(红龙番外:毁灭)》
- 09-06《Extra of Red Dragon:Il conflitto iniziò(红龙番外:冲突开始)》
- 09-06就活失败组(3)S1E9
- 09-06《Extra of Red Dragon:Размышлять(红龙番外:思索)》
- 09-06《Extra of Rea Dragon:Luce persa(红龙番外:逝去的光)》
- 09-06Chapter 3 / BB-2(羞耻、窥探、童话故事)
- 09-06《Extra of Red Dragon:Знать врага - значит всегда побеждать(红龙番外:知己知彼百战百胜)》
- 09-06叛逆的凌辱·中篇,1
- 09-06《Extra of Red Dragon:Первокурсник(红龙番外:新生)》,1
- 09-06《Extra of Red Dragon:Первокурсник(红龙番外:新生)》,2
- 09-06《Extra of Red Dragon:Уничтожение(红龙番外:毁灭)》
- 09-06《Extra of Red Dragon:Il conflitto iniziò(红龙番外:冲突开始)》
- 09-06就活失败组(3)S1E9
- 09-06《Extra of Red Dragon:Размышлять(红龙番外:思索)》
- 09-06《Extra of Rea Dragon:Luce persa(红龙番外:逝去的光)》
- 09-06Chapter 3 / BB-2(羞耻、窥探、童话故事)
- 网站分类
- 标签列表
-
- 约稿 (49)
- 淫男乱女(1~925) (24)
- 都市奇缘(未删节1-2910章) (23)
- 性癖短篇 (16)
- 少龙外传(2012.1.23更新至全文完) (27)
- 明星潜规则之皇(1-2080) (40)
- 随笔 (14)
- 约稿系列 (11)
- 水果学园 (11)
- 小说H改续写-《网游之代练传说时停系统》牛牛娘二改GHS版 (23)
- 靠近女局长:权力征途(1-2卷233) (21)
- 娇娇师娘(2012年2月4日全文完+外篇化羽成仙篇240章) (38)
- 恶魔博士的后宫之路【明日方舟系列】 (24)
- 挥剑诗篇 (15)
- 都市偷心龙爪手(未删节1-1370章) (39)
- Sexual Rhapsody《性爱狂想曲》全 (21)
- 福艳之都市后宫(福临之都市逍遥 )更新至951章 (44)
- 在宝可梦当混邪人 (47)
- 胭脂口红作品集更新至48部作品集更新至48部作者:胭脂口红 (38)
- 午夜风流(华夏神龙)全 (11)
- 纹龙 (20)
- 黑月作品集 (34)
- 女校先生完 (13)
- 龙魂侠影(全本) (35)
- 六朝清羽记+六朝云龙吟+六朝燕歌行(全本) (32)
- 碧蓝航线 (25)
- 风流女儿国全 (21)
- 无耻魔霸全600章 (30)
- 娇娇娘子(都市风月奇谭)(1-580章) (23)
- 神鹰帝国(未删节 卷1第1章-卷6第2章) (43)
- 短篇 (17)
- 这才不是我想要的命运 (23)
- 阿里布达年代记+祭 (43)
- 《末世之黑暗召唤师》扶她无绿改版 (13)
- 情迷女人香更新至476章 (47)
- 红尘都市2011.3.5更新至475章全本结束 (26)
- RPG冒險家與冒險家世界的邂逅 (50)
- 精神力研究协会 (31)
- 护花野蛮人(狂帝百美缘)(全本) (14)
- 狡猾的风水相师全 (38)
- 重生之红色纨绔1--450 (46)
- 特典 (27)
- 风雨里的罂粟花(1-9.4) (43)
- 洪荒少年猎艳录(未删节1-380章){13/11/1更新} (39)
- AI类杂篇 (25)
- 骑士的血脉1—44卷 (46)
- 全文完 (46)
- 江湖有鱼全 (28)
- 狡猾的风水相师(全) (27)
- 邪恶小正太的熟女征服之旅 (24)
- 永恒国度系列全 (31)
- 通知 (9)
- 御心香帅(香国盗艳)(1-573) (28)
- 豪门浪荡史(未删节1-844章) (50)
- 我上了一棵世界树 [IE浏览器汉化] (31)
- 骑士的血脉完结 (41)
- 孤雏情陷红粉争霸(未删节1-740章) (30)
- 姐夫的荣耀(五部)(全本) (33)
- 官场风月未删节1-1154 (27)
- 继母的明星闺蜜团(1-1786完) (31)
- 我的天下2012.3.6更新 (9)
- 乡村乱情(1-18.47) (47)
- 转载系列 (44)
- 娱乐圈的不正常系统(1-570) (24)
- 我的姐姐是美女(1-3部+外篇) (14)
- 丝之恋--我与一对母女的故事(1-3.411) (22)
- 明日方舟 (10)
- 紫屋魔恋作品集 (7)
- 未分類小說 (26)
- 龙吟百美缘2012.2.20更新至420章 (34)
- 人生得意须纵欢(未删节1-700章) (35)
- 极品桃花运 (42)
- 群芳谱(未删节全本) (20)
- 圣女修道院全 (30)
- 重生特工艳美录 (全本) (42)
- 界能 (8)
- 少年大宝(1-720全) (36)
- 九流术士(1—第二部第32集) (9)
- 《我的天下》(封面实体1-34集) (27)
- 龙战士传说全 (26)
- 山村风流未删节1-775章 (37)
- 帝王时代全+番外 (22)
- 妖刀记(1-47卷 全本) (10)
- 情色搜神记更新到64章完+外篇+附录 (37)
- 穿越风流之情深深雨蒙蒙(1-799) (45)
- 姐姐保卫战(1-5部240章) (17)
- 【重生诡情】2022重编全集(章回目录插图版) (26)
- 风月大陆全本 (12)
- 覆雨翻云之逐艳曲更新至第9卷第63章 (19)
- 性爱狂想曲(1—65部全) (10)
- 盛夏晚晴天之津帆猎美(未删节1-310章) (37)
- 金毛黑人肌肉巨屌壯漢 (32)
- 他是空 (35)
- 這是他操翻提瓦特大陸的故事 (40)
- 娇艳人生全 #1 (28)
- 男人幻想全 (27)
- 性奴训练学园 (50)
- 山村情事(极品人生)全 (49)
- 娇娇倚天(1-330章) (23)
- 销魂倚天神雕全 (46)
- 花都少帅(全本) (48)
- 焚天愤天淫魔阴魔更新至267章 (28)
- 龙战士合集前传+正传 +外传整理中 (31)
- 短篇合集 (10)
- 魅魔学院的反逆者 (37)
- 快乐人生更新至第412章 (29)
- 这年头老婆都是自己找上门的! (26)
- 重生之圣途风流(七卷)(全本) (28)
- 杂文 (29)
- 麦子的方舟 (22)
- 小镇飞花 (38)
- 约稿合集 (39)
- 委托已完结 (43)
- 小镇飞花全 (19)
- 色城2010岁末征文·文心雕龙第三届(人妻)(全集) (32)
- 金主约稿 (26)
- 流氓大地主全 (10)
- 妻欲公与媳(1-1018) (32)
- 小村·春色全 (32)
- 睡着的武神全 (27)
- 石砚作品集 (7)
- 红尘有玉2012.6.17全文完结2012.6.17全文完结作者:红尘有玉 (37)
- 老板约稿 (27)
- 江山如此多娇全+26 (36)
- 无耻魔霸 (45)
- 365题 (28)
- 春花秋月(暧昧春情)(1-第3部55章未删节) (31)
- 魔女之吻乃百合之味-正传3:扭曲世界的残影 (28)
- 援神(原神) (38)
- 灼眼之原罪降临(灼眼的夏娜同人)(1-700) (24)
- 混蛋神风流史更新至10卷第8章 (11)
- 村光乡野全 (44)
- 混在后宫假太监(第6卷) (48)
- 魔女之吻乃百合之味1:梦与希望的女神 (17)
- 《精灵剑姬的地球之旅》 (24)
- 田野的春天第一及第二部(春色田野)全 (32)
- 每日打击盗狗指南 (48)
- 我认识的100个女孩(百魔女)全 (38)
- 悦女吴县全 (45)
- 收藏 (30)
- 天生我材必有用+续-生命的奔流(全本) (33)
- 蝶・源之章 (20)
- R18-僕(BOKU) (32)
- 欲火轮回(1-8.7.3) (42)
- 魔女之吻乃百合之味-正传1:梦与希望的女神 (46)
- 绝色保镖完 (34)
- 女校先生(1-32) (33)
- 极品辣妈好v5 (30)
- 長篇小說 (44)
- 色城2009岁末征文·文心雕龙第二届(江湖)(全集) (47)
- 仙媳攻略 (25)
- 徵信社的大小姐 (42)
- 淫束道具专家 (8)
- 半步多欲望传说Ⅱ(全) (26)
- 【欲火轮回】整编版(暂定) (27)
- 置换自导 (13)
- 御女天下(未删节1-500章) (36)
- 邪恶小仙帝的万界之旅 (10)
- 奴隶帝国全本 (13)
- 花落伴官途(1-309) (23)
- 恶魔养殖者全 (36)
- 校园群芳记(未删1-第2部70章) (34)
- 娱乐独裁者(全本) (7)
- 神都(全本) (36)
- 男人本色(风流成性)更新至第二部67章 (45)
- 美人图(完) (14)
- 乳胶女神们的生活拆分版 (28)
- 金鳞岂是池中物全+ 外传暂全+名家评论 (40)
- 盗香Ⅰ+Ⅱ(激情全本) (27)
- 變異血清 (36)
- 混世小色医(1-574章) (8)
- 碧藍航線 (34)
- 海盗的悠闲生活全 (18)
- 龙吟百美缘更新至390章 (37)
- 品花时录1-41 (7)
- 命运三部曲全 (25)
- 约稿放出 (15)
- TSF Novel Collection (22)
- 阴魂(娶个姐姐当老婆) (23)
- 正气寻「妇」录全 (36)
- 淫术炼金士1-33集 (22)
- 约稿公开 (49)
- 姐姐给我口交好不好(1-575) (38)
- 和护士后妈生活的日子(1-750) (48)
- 我和妻子江湖行(五部)(全本) (33)
- 魔刀丽影全 (12)
- 想写阴阳师 (26)
- ai电子酒馆 (45)
- 大绿鱼乐圈 (14)
- 幻梦唯心(1.1.1-第四部完) (47)
- 《重生之风流大亨》(1-429)》(1-429)作者:风流大亨 (33)
- 枕上的魔法使 (13)
- 风流传奇(1~2部80章) (8)
- 淫术炼金士 (41)
- 销魂倚天神雕(全本) (17)
- 异世之暗黑全职者(未删节)(全本) (25)
- 仙子的修行 (16)
- 我与她的爱恨淫仇 (30)
- 地下紳士競技場 (34)
- 女警故事 (7)