program main
implicit none
type chengji
integer::s_id
real::pscj
real::qmcj
real::zcj
end type
integer :: i
type(chengji),allocatable :: student(:)
write(*,*) "请输入学生人数"
read(*,*) n
allocate( student(n) )
write(*,*) "请输入",n,"名学生的学号、平时成绩、期末成绩"
do i =1,n
read(*,*) student(i)%sid,student(i)%pscj,student(i)%qmcj
end do
do i =1,n
student(i)%zcj = 0.3*student(i)%pscj+0.7*student(i)%qmcj
end do
! 然后,排序,统计
end