You are on page 1of 1

BEGIN

DECLARE avgh,sumh, height AS FLOAT


DECLARE avga,suma, age,x AS INTEGER
suma<-0
sumh<-0
FOR TStu1 TO 34 DO
PRINT “Enter your age:”
READ age
PRINT “Enter your height:”
READ height
suma<-suma+age
sumh<-sumh+height
ENDFOR
avgh<-sumh/34
avga<- suma/34
END

BEGIN
DECLARE TAge, THeight, TStu, Age, Height as INTEGER
DECLARE Ave_Age, Ave_Height as FLOAT
PRINT “Please enter your age and height.”
READ TAge
READ THeight
TStu1
REPEAT
PRINT “Please enter your age and height.”
READ Age, Height
TAgeTAge + Age
THeightTHeight + Height
TStuTStu + 1
UNTIL TStu = 34
Ave_AgeTAge/TStu
Ave_HeightTHeight/TStu
PRINT “The average age is ”, Ave_Age, “and average height is ”,
Ave_Height
END

You might also like