Thursday, November 12, 2020

 

1. TO INPUT 20 NUMBERS AND DISPLAY THEIR SUM .


START 

STEP 1: DECLARE THE VARIABLES  J , C AND NUM  AS INTEGER

STEP 2: J=1 , C=0 , NUM=0

STEP 3: INPUT "ENTER THE VALUE OF NUMBER"; NUM

STEP 4: C=C+NUM

STEP 5: INCREAMENT THE VALUE OF J BY 1

STEP 6:  IF J<=NUM THEN GOTO STEP 3 ELSE GOTO STEP 7

STEP 7 :PRINT "SUM IS:" ; C

END



No comments:

Post a Comment

  3.WAP IN JAVA TO INPUT THREE NUMBERS AND COUNT HOW MANY OF THEM ARE EVEN .   import java.util.*; class Prog {   public static ...