Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 


Quelle  rabatt.cob   Sprache: Cobol

 
      *--------------------------------------------
      * berechne Rabatt Andreas Spillner/HS-Bremen
      * Softwaretechnik Trends Band 44 Heft 4
      *--------------------------------------------
       Identification Division.
       Program-Id. Calculate-Price.
       Author. NN.
       Data Division.
       Working-Storage Section.
         77 addon-discount    pic 9(8)V9(8).
       Linkage Section.
         77 baseprice        pic 9(8)V9(8).
         77 specialprice     pic 9(8)V9(8).
         77 extraprice       pic 9(8)V9(8).
         77 extras           pic 9(4).
         77 discount         pic 9(8)V9(8).
         77 result           pic 9(8)V9(8).
       Procedure Division using baseprice, specialprice,
                     extraprice, extras returning result.
      * Beispiel mit Fehler!
        if extras>=3 then
          move 10 to addondiscount
        else if extras >=5 then
          move 15 to addondiscount
        else
          move 0 to addondiscount.
        if discount>=addon-discount then
          move discount to addon-discount.
        compute result =baseprice / 100 * (100-discount)
                        + specialprice+extraprice/100
                        *(100-addon-discount)
      * result wird zurückgegeben
       End-Program Calculate-Price.

Messung V0.5
C=82 H=100 G=91

¤ Dauer der Verarbeitung: 0.9 Sekunden  (vorverarbeitet)  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Software

     Produkte
     Quellcodebibliothek

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....

Besucherstatistik

Besucherstatistik

Monitoring

Montastic status badge