Skip to main content

Part of the book series: Uni—Texte ((UT))

  • 19 Accesses

Zusammenfassung

In diesem Paragraphen wollen wir uns die Aufgabe stellen, den Mittelwert m zweier Zahlen a und b mit Hilfe der Rechenanlage zu berechnen: m=

$$m = \frac{{a + b}}{2}$$

und es sei a= 1,4 und b=2

Wie man sofort im Kopf ausrechnen kann, wird m den Wert 1,7 erhalten, also nicht ganzzahlig sein, Wir werden für m den Typ “einfache Gleitkommazahl” vorsehen. Dies geschieht durch die Anweisung

REAL * 4 M

Hierdurch wird für die Variable m, die in unserem Programm den Namen M haben soll, nicht nur der Typ festgelegt, sondern gleichzeitig wird ein Speicherplatz in der Größe 4 Bytes reserviert.

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

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 49.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 59.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

Institutional subscriptions

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 1972 Friedr. Vieweg + Sohn GmbH, Verlag, Braunschweig

About this chapter

Cite this chapter

Lamprecht, G. (1972). Ein einführendes Beispiel. In: Einführung in die Programmiersprache FORTRAN IV. Uni—Texte. Vieweg+Teubner Verlag. https://doi.org/10.1007/978-3-322-89738-1_3

Download citation

  • DOI: https://doi.org/10.1007/978-3-322-89738-1_3

  • Publisher Name: Vieweg+Teubner Verlag

  • Print ISBN: 978-3-528-13307-8

  • Online ISBN: 978-3-322-89738-1

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics