Skip to main content

Number Theory 1

  • Chapter
  • 29 Accesses

Abstract

In this chapter we put the computer to work doing the kind of tasks it does best, repetitions of simple procedures. How long would it take you to add the first 1000 odd numbers? Before taking pencil in hand, let’s see how to program the VIC to solve this problem. There are several ways to find the answer but one of the simplest is:

  • 5 S = 0: CO = 0

  • 10 FOR Q = 1 TO 1999 STEP 2

  • 20 LETS = S + Q

  • 30 PRINT S

  • 40 NEXT

  • 50 PRINT “THE SUM IS”;S

This is a preview of subscription content, log in via an institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 1983 Birkhäuser Boston, Inc.

About this chapter

Cite this chapter

Kahn, D., Scrimshaw, N.B. (1983). Number Theory 1. In: Discover Your VIC-20. Birkhäuser Boston. https://doi.org/10.1007/978-1-4615-9816-9_9

Download citation

  • DOI: https://doi.org/10.1007/978-1-4615-9816-9_9

  • Publisher Name: Birkhäuser Boston

  • Print ISBN: 978-1-4615-9818-3

  • Online ISBN: 978-1-4615-9816-9

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics