[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/db/driver/mysqli.php on line 264: mysqli_fetch_assoc(): Couldn't fetch mysqli_result [phpBB Debug] PHP Warning: in file [ROOT]/phpbb/db/driver/mysqli.php on line 326: mysqli_free_result(): Couldn't fetch mysqli_result [phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4149: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3027) [phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4149: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3027) [phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4149: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3027) [phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4149: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3027) Small problem in a small program - Pete's QBASIC Site
DIM num AS STRING
DIM nrnot AS INTEGER
DIM n(i) AS INTEGER
DIM sum AS INTEGER
INPUT "Numele: "; num
PRINT "Nr de note pentru studentul "; num; ":";
INPUT nrnot
FOR i = 1 TO nrnot
IF i = 1 THEN
PRINT "Introdu prima nota: "
INPUT n(i)
ELSE
PRINT "Introdu a- "; i; "-a nota:"
INPUT n(i)
END IF
sum = sum + n(i)
NEXT i
med = sum / nrnot
PRINT "Media este:"
IF med < 5 THEN
COLOR 4
PRINT med
ELSEIF med = 5 THEN
COLOR 2
PRINT med
ELSE
COLOR 1
PRINT med
END IF
COLOR 0