Saturday, October 16, 2021

WAP to find the sum of factors of a given number. (USING SUB PROCEDURE)

WAP to find the sum of factors of a given number. (USING SUB PROCEDURE)

DECLARE SUB SUM FACTORS (A)

CLS

INPUT "ENTER A NUMBER"; A

CALL SUM FACTORS (A)

END 

SUB SUM FACTOR (A)

F=1

FOR I =1 TO N

F=F*I

S=S+2

NEXT I 

PRINT "THE SUM OF FACTORS OF NUMBER IS"; S

END SUB

Click here for more...

1 comment:

Sharkey

Simple way to make website using HTML only.

 A simple way to make a website using HTML only. <!DOCTYPE html> <head>         <title>Document</title> </head...