! ΥΠΟΛΟΓΙΣΜΟΣ ΜΟΡΙΩΝ ΚΑΙ ΑΝΑΛΥΤΙΚΗ ΕΚΘΕΣΗ ΑΠΟΤΕΛΕΣΜΑΤΟΣ
πρόγραμμα mo
μεταβλητές
ακέραιες :i,j
ΠΡΑΓΜΑΤΙΚΕΣ: math[6,3],prof[6],bpros,moria
ΧΑΡΑΚΤΗΡΕΣ: s[6],ss[3]
αρχή
γράψε 'dose ta eksetazomena mathimata kata seira afksimenis varitititas'
για i από 1 μέχρι 6
γράψε 7-i,' apomenoun'
διάβασε s[i]
τέλος_επανάληψης
ss[1] <-- 'Atet'
ss[2] <-- 'Btet'
ss[3] <-- 'grapto'
ΚΑΘΑΡΙΣΕ_ΟΘΟΝΗ
για i από 1 μέχρι 6
για j από 1 μέχρι 3
γράψε s[i],' ',ss[j]
διάβασε math[i,j]
τέλος_επανάληψης
ΓΡΑΨΕ
γράψε 6-i,'mathimata apomenoun'
γράψε
τέλος_επανάληψης
για i από 1 μέχρι 6
αν (math[i,1]+math[i,2])/2-math[i,3]>2 τότε
prof[i] <-- math[i,3]+2
αλλιώς_αν math[i,3]- (math[i,1]+math[i,2])/2>2 τότε
prof[i] <-- math[i,3]-2
αλλιώς
prof[i] <-- (math[i,1]+math[i,2])/2
τέλος_αν
bpros <-- bpros+ (prof[i]*0.3+math[i,3]*0.7)/6
τέλος_επανάληψης
καθάρισε_οθόνη
γράψε 'bathmosAtet ','batmosBtet ','MOtetPrin ','MOtetMeta ','grapto ','bprosb '
για i από 1 μέχρι 6
γράψε s[i]
γράψε' ', math[i,1],' ', math[i,2],' ', (math[i,1]+math[i,2])/2:1:1,' ',prof[i]:1:1,' ' ,math[i,3]:1:1,' ', (prof[i]*0.3+math[i,3]*0.7):1:1
γράψε '________________________________________________________________________'
τέλος_επανάληψης
moria <-- (1.3*(prof[1]*0.3+math[1,3]*0.7)+0.7*(prof[2]*0.3+math[2,3]*0.7)+bpros*8)*100
γράψε 'moria', moria:6:0
τέλος_προγράμματος