Wednesday, October 16, 2019

118. Qbasic program to print first ten odd numbers. [SLC 2071 S]

118. Write a sub program to print first ten odd numbers. [SLC 2071 S]

DECLARE SUB SERIES ( )
CLS
CALL SERIES
END

SUB SERIES
FOR I = 1 TO 10
S = S + I
NEXT I
PRINT “SUM OF FIRST  TEN POSITIVE INTEGERS” ; S
END SUB

4 comments:

  1. its for bigger class not for childeren bruhh didnt help no thanks 0-0

    ReplyDelete
  2. Since it is odd there should be FOR I = 1 to 10 step 2

    ReplyDelete
  3. Chutiyaa bhosadi ke teri maa zavi mereko lawda

    ReplyDelete
  4. I think this is not the way to react ☹️😡😡

    ReplyDelete