|
|
 |
Oskom Forums Добро пожаловать на Oskom Forums.
|
-
Нужна помошь (Фортран)
Вот собственно нужна помошь , тк сам в етом не разбираюсь не черта =)
есть программа и нужно внести в нее изменения...
1)Very Good нет двоек и максимум одна тройка
2) Bad минимум 2 двойки
program pr1
character A(10)*12
integer B(10,5)*2, VG(10), G(10), BD(10), l, s,e
print*,'vvedite kolichestvo studentov (max=10):'
read*,s
print*,'vvedite kolichestvo ekzamenov (max=5):'
read*,e
do i=1,s
print *,i,' student :'
read *,A(i)
end do
do i=1,s
do j=1,e
print *,A(i),' ekzamen ',j
read *,B(i,j)
end do
end do
print *,'=============================================== ===========================' ! nachalo pechati tablici
print *,'| Student | Ekzamen |'
print *,'| | 1 2 3 4 5 |'
print *,'=============================================== ===========================' ! shapka
do i=1,s
print *,'|',A(i),'|',B(i,1),'|',B(i,2),'|',B(i,3),'|',B( i,4),'|',B(i,5),'|' ! zavershenie
end do
k=1
n=1
m=1
do i=1,s
l=0
do j=1,e
if (B(i,j)<3) then
BD(k)=i
k=k+1
goto 11
end if
if (B(i,j)==3) then
l=l+1
end if
if (j==e) then
if (l>0) then
G(n)=i
n=n+1
goto 11
end if
if (l==0) then
VG(m)=i
m=m+1
goto 11
end if
end if
end do
11 end do
print *,'=============================================== ==========================='
print *,''
print *,''
print *,'=============================================== ==========================='
print *,'| Very Good | | | | | |'
do i=1,m
print *,'| ',A(VG(i)),' |',B(VG(i),1),'|',B(VG(i),2),'|',B(VG(i),3),'|',B( VG(i),4),'|',B(VG(i),5),'|'
end do
print *,'=============================================== ==========================='
print *,'| Good | | | | | |'
do i=1,n
print *,'| ',A(G(i)),' |',B(G(i),1),'|',B(G(i),2),'|',B(G(i),3),'|',B(G(i ),4),'|',B(G(i),5),'|'
end do
print *,'=============================================== ==========================='
print *,'| Bad | | | | | |'
do i=1,k
print *,'| ',A(BD(i)),' |',B(BD(i),1),'|',B(BD(i),2),'|',B(BD(i),3),'|',B( BD(i),4),'|',B(BD(i),5),'|'
end do
print *,'=============================================== ==========================='
pause
end
Буду очень признателен... заранее спасибо
Ваши права
- Вы не можете создавать новые темы
- Вы не можете отвечать в темах
- Вы не можете прикреплять вложения
- Вы не можете редактировать свои сообщения
Правила форума
|