write q-basic programme display number 1 to 50?
Answers
Answered by
2
FOR COUNT = 1 TO 50
PRINT COUNT
NEXT COUNT
END
anirbanmukherje:
Leave line after 50 , after print count, next count and afet end
Answered by
2
REM Program to print all prime numbers from 1 to 50
CLS
FOR n = 2 TO 50
FOR k = 2 TO n / 2
flag = 0
r = n MOD k
IF r = 0 THEN
flag = 1
EXIT FOR
END IF
NEXT k
IF flag = 0 THEN PRINT n,
NEXT n
END
CLS
FOR n = 2 TO 50
FOR k = 2 TO n / 2
flag = 0
r = n MOD k
IF r = 0 THEN
flag = 1
EXIT FOR
END IF
NEXT k
IF flag = 0 THEN PRINT n,
NEXT n
END
Similar questions