Lesson Archives

  1. CLS INPUT "ENTER FIRST STRING"; A$ INPUT "ENTER SECOND STRING"; B$ INPUT "ENTER THIRD STRING"; C$ IF LEN(A$) < LEN(B$) AND LEN(A$) < LEN(C$) THEN S$ = A$ IF LEN(B$) < LEN(A$) AND LEN(B$) < LEN(C$) THEN S$ = B$ ELSE S$ = C$ END IF PRINT "SHORTEST STRING="; S$ END USING SUB PROCEDURE DECLARE […]
  2. CLS DIM N(10) AS STRING FOR I = 1 TO 10 INPUT "ENTER THE STRINGS"; N(I) NEXT I FOR I = 1 TO 10 FOR J = 1 TO 10 - I IF N(J) < N(J + 1) THEN SWAP N(J), N(J + 1) NEXT J NEXT I PRINT "STRINGS ARRANGED IN DESCENDING ORDER" FOR […]
  3. CLS DIM N(10) AS STRING FOR I = 1 TO 10 INPUT "ENTER THE STRINGS"; N(I) NEXT I FOR I = 1 TO 10 FOR J = 1 TO 10 - I IF N(J) > N(J + 1) THEN SWAP N(J), N(J + 1) NEXT J NEXT I PRINT "STRINGS ARRANGED IN ASCENDING ORDER" FOR […]
  4. CLS INPUT "ENTER FIRST STRING"; A$ FOR I = 2 TO 10 INPUT "ENTER NEXT STRING"; B$ IF LEN(B$) < LEN(A$) THEN A$ = B$ NEXT I PRINT "SHORTEST STRING="; A$ END USING SUB PROCEDURE DECLARE SUB SHRT( A$ ) CLS INPUT "ENTER FIRST STRING"; A$ CALL SHRT (A$) END SUB SHRT (A$) FOR I […]
  5. CLS INPUT "ENTER FIRST STRING"; A$ FOR I = 2 TO 10 INPUT "ENTER NEXT STRING"; B$ IF LEN(B$) > LEN(A$) THEN A$ = B$ NEXT I PRINT "LONGEST STRING="; A$ END USING SUB PROCEDURE DECLARE SUB LON( A$ ) CLS INPUT "ENTER FIRST STRING"; A$ CALL LON (A$) END SUB LON (A$) FOR I […]
  6. CLS INPUT "ENTER ANY CHARACTER"; A$ B = ASC(A$) IF B >= 65 AND B <= 90 OR B >= 97 AND B <= 122 THEN CK$ = "SUPPLIED CHARACTER IS ALPHABET" ELSE CK$ = "SUPPLIED CHARACTER IS NOT ALPHABET" END IF PRINT CK$ END SUB USING SUB PROCEDURE DECLARE SUB CHECK (A$) CLS INPUT […]
error: Content is protected !!