Programming tasks 3-3-2025
Programming tasks 3-3-2025
OUTPUT str1
ENDWHILE
CLOSEFILE "NumberFile.txt"
Q2.
PROCEDURE Print100
OUTPUT count
NEXT count
ENDPROCEDURE
Q3.
return a * b
ENDFUNCTION
Page 1 of 8
Q4.
INPUT searchVal
IF DataArray[count] = searchVal
THEN
ENDIF
NEXT count
IF found
THEN
ELSE
ENDIF
Page 2 of 8
Q5.
NEXT count
CLOSEFILE "NumberFile.txt"
Q6.
OUTPUT count
NEXT count
Page 3 of 8
Q7.
INPUT mark
IF mark >= 90
THEN
ELSE
IF mark >= 80
THEN
ELSE
IF mark >= 70
THEN
ELSE
IF mark >= 60
THEN
ELSE
ENDIF
ENDIF
ENDIF
ENDIF
Page 4 of 8
Q8.
Total <- 0
FOR X <- 1 TO 50
NEXT X
RETURN Total
ENDFUNCTION
Page 5 of 8
Q9.
INPUT num
count <- 0
less <- 0
more <- 0
INPUT inputVal
IF inputVal = 0
THEN
ENDIF
THEN
ELSE
ENDIF
ENDWHILE
Page 6 of 8
Q10.
REPEAT
INPUT num
UNTIL num = 10
Q11.
INPUT str1
ENDWHILE
Q12.
INPUT file
CLOSEFILE
Page 7 of 8
Q13.
CLOSEFILE "dataStore.txt"
OUTPUT str1
Page 8 of 8