0% found this document useful (0 votes)
25 views3 pages

Calculate Sum and Product of Terms

The document contains a code snippet that calculates the sum and product of a series of terms based on user input for the number of terms (N). It initializes variables for the sum (S) and product (P) and iterates to compute the values. Finally, it prints the calculated sum and product to the output.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views3 pages

Calculate Sum and Product of Terms

The document contains a code snippet that calculates the sum and product of a series of terms based on user input for the number of terms (N). It initializes variables for the sum (S) and product (P) and iterates to compute the values. Finally, it prints the calculated sum and product to the output.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

REM 2...5....10....17....26......

N TERMS CLS S = 0 P = 1 V = 1 INPUT "ENTER NO OF TERMS"; N FOR I =


1 TO N PRINT V * V + 1; " "; S = S + (V * V + 1) P = P * (V * V + 1) V = V + 1 NEXT I PRINT PRINT
"SUM IS="; S PRINT "PRODUCT IS="; P END

You might also like