东北大学计算机学院绩点公示,#求教#教务处查不了绩点了后续

该楼层疑似违规已被系统折叠 隐藏此楼查看此楼

听说教务处查不了绩点了,学过编程的文科生心里痒痒

用turbo pascal 7.0编了个程,

求各位软件计算机大佬批评指正。

program JIDIANJISUAN;

type

arrtype1=array[1..1000]of integer;

arrtype2=array[1..1000]of real;

var

GPA:real;

Chongkao,Guake:arrtype1;

Xuefen,Chengji,GPAn:arrtype2;

a,b,c,d,e,f,g,h,i,j:integer;

x,x1,y,z,z1:integer;

den,num:real;

begin

writeln('Welcome to use GPA calculator, please follow the instructions.');

writeln('And,"You"=95,"Liang"=85,"Zhong"=75,"Jige"=65,"Bujige"=0,"Hege"=80,"Buhege"=0');

writeln('If you failed a course and attended to a make-up examination,');

writeln('then the grade is 0, and the number of re examinations is 2');

for x:=1 to 1000 do

Chongkao[X]:=1;

x1:=1;

writeln('Please input the number of your courses in the first semester:');

readln(a);

if a>0 then

for x:=1 to a do

begin

writeln('Please input the grade, point of course',x1);

readln(Chengji[x],Xuefen[x]);

inc(x1);

end;

writeln('If you failed some courses, please input the number,if not, please input 0:');

readln(z);

if z>0 then

begin

writeln('please input each order number of your failed course and press Enter:');

for z1:=1 to z do

begin

readln(Guake[z1]);

Chongkao[Guake[z1]]:=2;

end;

end;

x1:=1;

writeln('Please input the number of your courses in the second semester:');

readln(b);

if b>0 then

for x:=a+1 to a+b do

begin

writeln('Please input the grade, point of course',x1);

readln(Chengji[x],Xuefen[x]);

inc(x1);

end;

writeln('If you failed some courses, please input the number,if not, please input 0:');

readln(z);

if z>0 then

begin

writeln('please input each order number of your failed course and press Enter:');

for z1:=1 to z do

begin

readln(Guake[a+1+z1]);

Chongkao[Guake[a+1+z1]]:=2;

end;

end;

x1:=1;

writeln('Please input the number of your courses in the third semester:');

readln(c);

if c>0 then

for x:=a+b+1 to a+b+c do

begin

writeln('Please input the grade, point of course',x1);

readln(Chengji[x],Xuefen[x]);

inc(x1);

end;

writeln('If you failed some courses, please input the number,if not, please input 0:');

readln(z);

if z>0 then

begin

writeln('please input each order number of your failed course and press Enter:');

for z1:=1 to z do

begin

readln(Guake[a+b+1+z1]);

Chongkao[Guake[a+b+1+z1]]:=2;

end;

end;

x1:=1;

writeln('Please input the number of your courses in the fourth semester:');

readln(d);

if d>0 then

for x:=a+b+c+1 to a+b+c+d do

begin

writeln('Please input the grade, point of course',x1);

readln(Chengji[x],Xuefen[x]);

inc(x1);

end;

writeln('If you failed some courses, please input the number,if not, please input 0:');

readln(z);

if z>0 then

begin

writeln('please input each order number of your failed course and press Enter:');

for z1:=1 to z do

begin

readln(Guake[a+b+c+1+z1]);

Chongkao[Guake[a+b+c+1+z1]]:=2;

end;

end;

x1:=1;

writeln('Please input the number of your courses in the fifth semester:');

readln(e);

if e>0 then

for x:=a+b+c+d+1 to a+b+c+d+e do

begin

writeln('Please input the grade, point of course',x1);

readln(Chengji[x],Xuefen[x]);

inc(x1);

end;

writeln('If you failed some courses, please input the number,if not, please input 0:');

readln(z);

if z>0 then

begin

writeln('please input each order number of your failed course and press Enter:');

for z1:=1 to z do

begin

readln(Guake[a+b+c+d+1+z1]);

Chongkao[Guake[a+b+c+d+1+z1]]:=2;

end;

end;

x1:=1;

writeln('Please input the number of your courses in the sixth semester:');

readln(f);

if f>0 then

for x:=a+b+c+d+e+1 to a+b+c+d+e+f do

begin

writeln('Please input the grade, point of course',x1);

readln(Chengji[x],Xuefen[x]);

inc(x1);

end;

writeln('If you failed some courses, please input the number,if not, please input 0:');

readln(z);

if z>0 then

begin

writeln('please input each order number of your failed course and press Enter:');

for z1:=1 to z do

begin

readln(Guake[a+b+c+d+e+1+z1]);

Chongkao[Guake[a+b+c+d+e+1+z1]]:=2;

end;

end;

x1:=1;

writeln('Please input the number of your courses in the seventh semester:');

readln(g);

if g>0 then

for x:=a+b+c+d+e+f+1 to a+b+c+d+e+f+g do

begin

writeln('Please input the grade, point of course',x1);

readln(Chengji[x],Xuefen[x]);

inc(x1);

end;

writeln('If you failed some courses, please input the number,if not, please input 0:');

readln(z);

if z>0 then

begin

writeln('please input each order number of your failed course and press Enter:');

for z1:=1 to z do

begin

readln(Guake[a+b+c+d+e+f+1+z1]);

Chongkao[Guake[a+b+c+d+e+f+1+z1]]:=2;

end;

end;

x1:=1;

writeln('Please input the number of your courses in the eighth semester:');

readln(h);

if h>0 then

for x:=a+b+c+d+e+f+g+1 to a+b+c+d+e+f+g+h do

begin

writeln('Please input the grade, point of course',x1);

readln(Chengji[x],Xuefen[x]);

inc(x1);

end;

writeln('If you failed some courses, please input the number,if not, please input 0:');

readln(z);

if z>0 then

begin

writeln('please input each order number of your failed course and press Enter:');

for z1:=1 to z do

begin

readln(Guake[a+b+c+d+e+f+g+1+z1]);

Chongkao[Guake[a+b+c+d+e+f+g+1+z1]]:=2;

end;

end;

x1:=1;

writeln('Please input the number of your courses in the ninth semester:');

readln(i);

if i>0 then

for x:=a+b+c+d+e+f+g+h+1 to a+b+c+d+e+f+g+h+i do

begin

writeln('Please input the grade, point of course',x1);

readln(Chengji[x],Xuefen[x]);

inc(x1);

end;

writeln('If you failed some courses, please input the number,if not, please input 0:');

readln(z);

if z>0 then

begin

writeln('please input each order number of your failed course and press Enter:');

for z1:=1 to z do

begin

readln(Guake[a+b+c+d+e+f+g+h+1+z1]);

Chongkao[Guake[a+b+c+d+e+f+g+h+1+z1]]:=2;

end;

end;

x1:=1;

writeln('Please input the number of your courses in the tenth semester:');

readln(j);

if j>0 then

for x:=a+b+c+d+e+f+g+h+i+1 to a+b+c+d+e+f+g+h+i+j do

begin

writeln('Please input the grade, point of course',x1);

readln(Chengji[x],Xuefen[x]);

inc(x1);

end;

writeln('If you failed some courses, please input the number,if not, please input 0:');

readln(z);

if z>0 then

begin

writeln('please input each order number of your failed course and press Enter:');

for z1:=1 to z do

begin

readln(Guake[a+b+c+d+e+f+g+h+i+1+z1]);

Chongkao[Guake[a+b+c+d+e+f+g+h+i+1+z1]]:=2;

end;

end;

den:=0;

num:=0;

for y:=1 to x do

begin

GPAn[y]:=Chengji[y]/10-5;

end;

for y:=1 to x do

den:=den+Xuefen[y]*Chongkao[y];

for y:=1 to x do

num:=num+GPAn[y]*Xuefen[y];

GPA:=num/den;

writeln('Your GPA is:',GPA:6:6);

readln;

end.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值