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 1046503
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T16:09:21+00:00 2026-05-16T16:09:21+00:00

adding value together. so: 1 + 0 = 1 3 + 1 = 4

  • 0

adding value together.

so:

1 + 0 = 1

3 + 1 = 4

4 + 4 = 8

How do I get this, so that it starts off at 0, and i type in 1 into a txtbox, so it adds 1 to the total, next i type in 3, so it adds 3 to the total, which eqauls 4, now i type 4, and it adds 4 to the total, which means its at 8 now.

How do i write the code to keep adding to its self?

  • 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-05-16T16:09:22+00:00Added an answer on May 16, 2026 at 4:09 pm

    That sounds like homework, so I’ll put the answer on a level so I don’t give you the answer, but rather point out a direction.

    The core problem is that you will need to store the value, so that it is available when you want to add the next number to it. If you declare a local variable inside a method, it gets initialized each time the method runs. So instead you will need to hold the value somewhere outside of the method, such as in a class field. Then you can simply add the value from the text box to the field by

    1. Reading the string from the text box
    2. Converting the string to a numerical type (such as int)
    3. Add the number to the total stored in the class field
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 529k
  • Answers 529k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer You can use NULLIF: SELECT COl1,COl2 FROM Table1 where COL1… May 16, 2026 at 11:14 pm
  • Editorial Team
    Editorial Team added an answer Two things: You're creating stubs of the concrete class, not… May 16, 2026 at 11:14 pm
  • Editorial Team
    Editorial Team added an answer I found the best way to do this was to… May 16, 2026 at 11:14 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I thought that adding a value attribute set on the <select> element below would
I am using DbUnit together with Unitils, which works great most of the time.
I have stumbled across some code that is adding strings to a List but
Is it possible to insert a null value into a field using the AddNew
this is my very first post! I'm pretty desperate so I'm going above and
I have put together an example page detailing my problem My website is going
I'm trying to build a modified role system that has the following class/relationship structure:
I want to append two text files together. I have one file with a
I've got a model like this: class Thing(models.Model): property1 = models.IntegerField() property2 = models.IntegerField()
Ok so this may be a dumb question (probably some syntax) but Google didn't

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.