Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9255701
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T11:46:13+00:00 2026-06-18T11:46:13+00:00

<% option explicit dim n, sum n = 1 do while (n <= 10)

  • 0
<%
option explicit 
dim n, sum
n = 1
do while (n <= 10)
sum = sum + (n * n)
n = n + 1
loop
response.write (sum)
%>

The output on this code is 385.

I understand that we gave n the value of 1,

then the do while states execute while n is less than or equal to 10

then sum has the value of sum plus (n times n)

n is then has a + operator of 1

loop this until n is no longer less than of equal to 10

then output the sum 385

I don’t understand how this we get this output.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T11:46:14+00:00Added an answer on June 18, 2026 at 11:46 am
    sum     n
    0       1       n<=10 TRUE
    1       2       n<=10 TRUE
    5       3       n<=10 TRUE
    14      4       n<=10 TRUE
    30      5       n<=10 TRUE
    55      6       n<=10 TRUE
    91      7       n<=10 TRUE
    140     8       n<=10 TRUE
    204     9       n<=10 TRUE
    285     10      n<=10 TRUE
    385     11      n<=10 FALSE
    
    Exits loop and print 385
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I saw this post: Typos… Just use option strict and explicit please.. during one
First off, here is what I have so far: Option Explicit Dim y As
Salutations, I have the following VBScript: Option Explicit Dim objWMIService, objProcess, colProcess Dim strComputer,
I am trying to delete a registry key. Here is my code: Option Explicit
Option Explicit Sub peuler1() Dim x As Variant Dim y As Variant y =
Given that we have a script Option Explicit Class CClass Private m_date Private Sub
Here is the small script I wrote: Option Explicit Dim strFileFullName As String Sub
Home Option 1 Option 2 And I apply the styles with this classes #contentheader
For the option to launch a new EC2 instance like this one, how similar
I want to create this simple division program.But the problem is that the divisors

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.