Monday, August 31, 2020

1.WRITE AN ALGORITHM TO CALCULATE AND DISPLAY OF THE FOLLOWING SERIES :  

    1x2+2x3+3x4+......nx(n+1) 

 

START 

STEP 1: Declare the variable n ,c and i as integer.

STEP 2: Initialize n=c=0 and i=1

STEP 3: Input the value of n 

STEP 4: If i<=n then c=c+(i x (i+1)) ,goto step 5 else goto 6

STEP 5 : Increment the value of i by 1 and goto step 4 

STEP 6 : Display the value of 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 ...