Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Calculator
#12
(07-25-2022, 09:53 PM)SierraKen Wrote: Thanks! Wow I never really got into C much myself, mostly always stuck with different variations of BASIC since the 80's. Although I did make many websites in html and a little bits of C, Visual Basic, etc.

Yes, I once created my largest program in C, this financial program - around 12,000 to 14,000 lines.

In HTML, a page of it looked something like this. There is a "Call" call.

I remember handing the HTML page input to a Java program via VBScribt. That performed the calculation and returned the result. - One shouldn't see the code for the calculations. Was just like that.

Code: (Select All)
<!-- Höhe von Jahresraten bei bekanntem Endwert, vor- nachschüssig. - 1.10.1997 -->

<HTML>
<HEAD>
    <TITLE>Rentenrechnung</TITLE>
    
<SCRIPT LANGUAGE="VBScript">
<!-- Option Explicit    
Dim ZinsForm
     
'Radiobutton initialisieren
ZinsForm = "Nach"
Sub ZahlungsForm(NeuWahl)
   ZinsForm = NeuWahl
End Sub
        
Sub cmdBerechnen_Click()
    Dim ZahlungsWeise

    If ZinsForm = "Nach" Then
        ZahlungsWeise = "NA"
    Else
        ZahlungsWeise = "VR"
    End If
    
    If txtEndwert.Value = "" OR txtNominalZins.Value = ""  OR txtDauer.Value = "" Then
        MsgBox "Es fehlen Daten für eine Berechnung!", vbCritical, "Fehlermeldung"
        Exit Sub
    ElseIf IsNumeric(txtEndwert.Value) = False OR IsNumeric(txtNominalZins.Value) = False OR IsNumeric(txtDauer.Value) = False Then
        MsgBox "Eine Eingabe war kein numerischer Wert!", vbCritical, "Hinweis"            
        Exit Sub
    Else        
        Call document.ratenbetrag.berechnen(txtEndwert.Value, txtNominalZins.Value, ZahlungsWeise, txtDauer.Value)
    End If
End Sub
-->
</SCRIPT>            

</HEAD>
<BODY BGCOLOR="#C0C0C0">
<CENTER>
<TABLE width="50%" align="center" BORDER=4 BGCOLOR="#FFFFFF" BORDERCOLORDARK="#800080" BORDERCOLORLIGHT="#8000F0">
    <TR>
        <TD ALIGN=CENTER>
        <FONT SIZE="5"><FONT COLOR=#0000FF>
        Ermittlung der Höhe von Rentenraten bei feststehendem Renten(Spar-)endwert
        </FONT></FONT>        
        </TD>
    </TR>    
</TABLE>
</CENTER>

<p>
<CENTER>
<TABLE>
    <TR>
        <TD>
        <b><font color="#FFF8DC">   
    <input type="radio" name="optPeriodenzins" checked OnClick="ZahlungsForm('Nach')">
        Nachschüssig
    </font></b>   
        </TD>
        <TD><FONT COLOR="#C0C0C0">----</FONT></TD>
        <TD>
        <b><font color="#00FF00">
    <input type="radio" name="optPeriodenzins" OnClick="ZahlungsForm('Vor')">
        Vorschüssig
        </font></b>
        </TD>
    </TR>
</TABLE>
</CENTER>

<P>
<FORM NAME=Annu>
<TABLE  width="50%" align="center" BORDER=1 BGCOLOR="#00">
    <TR>
        <TD><FONT COLOR=#00FFFF>
      <B>Der angestrebte Rentenendbetrag beträgt
            <FONT COLOR=#00>--</FONT>:</B>
            </FONT>
        </TD>        
        <TD>
            <INPUT class="richt" TYPE="TEXT" NAME="txtBetrag" VALUE="" SIZE="20">        
        </TD>
        <TD ALIGN=LEFT><FONT COLOR=#00>-</FONT><FONT COLOR=#00FFFF><B>DM</B></FONT></TD>
        <TD ALIGN=CENTER><FONT COLOR=#>--</FONT>
        <BUTTON id="cmdBerechnen"
         style="width=90pt; background:black; font-family:arial; font-size:10pt; font-style:italic; font-weight:bold; color:#FC143C">
        <P ALIGN=CENTER>Berechnen</P>        
        </BUTTON>
        <FONT COLOR=#>--</FONT>
        </TD>
        <TD ALIGN=CENTER><FONT COLOR=#>--</FONT>
        <BUTTON id="cmdInfo"
         style="width=90pt; background:yellow; font-family:arial; font-size:10pt; font-style:italic; font-weight:bold; color:blue">
        <P ALIGN=CENTER>Information</P>        
        </BUTTON>
        <FONT COLOR=#>--</FONT>
        </TD>
    </TR>        
    <TR>
        <TD><FONT COLOR=#00FFFF>
      <B>Dieser Betrag wird verzinst zu
            <FONT COLOR=#00>----------------</FONT>:</B>
            </FONT>
        </TD>        
        <TD>
            <INPUT class="richt" TYPE="TEXT" NAME="txtZins" VALUE="" SIZE="20">
        </TD>
        <TD ALIGN=LEFT><FONT COLOR=#00>-</FONT><FONT COLOR=#00FFFF><B>%</B></FONT></TD>                
    </TR>    
    <TR>
        <TD><FONT COLOR=#00FFFF>
      <B>Geben Sie den Einzahlungszeitraum an
            <FONT COLOR=#00>-----</FONT>:</B>
            </FONT>
        </TD>        
        <TD>
            <INPUT class="richt" TYPE="TEXT" NAME="txtZeitraum" VALUE="" SIZE="20">
        </TD>
        <TD ALIGN=LEFT><FONT COLOR=#00>-</FONT><FONT COLOR=#00FFFF><B>Jahr(e)</B></FONT></TD>        
        <TD ALIGN=CENTER><FONT COLOR=#>--</FONT>
        <BUTTON id="cmdLoeschen"
         style="width=90pt; background:#FC143C; font-family:arial; font-size:10pt; font-style:italic; font-weight:bold;
                color:white">
        <P ALIGN=CENTER>Löschen</P>        
        </BUTTON>
        <FONT COLOR=#>--</FONT>
        </TD>
        <TD ALIGN=CENTER><FONT COLOR=#>--</FONT>
        <BUTTON id="cmdPost"
         style="width=90pt; background:blue; font-family:arial; font-size:10pt; font-style:italic; font-weight:bold;
                color:yellow">
        <P ALIGN=CENTER>e-mail</P>        
        </BUTTON>
        <FONT COLOR=#>--</FONT>
        </TD>
    </TR>                
</TABLE>

<p>
<TABLE width="50%" align="center" BORDER=1 BGCOLOR="#00">
    <TR>
        <TD width="392pi"><FONT COLOR=#FFFFA0>
      <B>Die Höhe der jährlich zu zahlenden Raten beträgt
            <FONT COLOR=#00>--</FONT>:</B>
            </FONT>
        </TD>        
        <TD width="190pi">
            <INPUT class="richt" TYPE="TEXT" NAME="txtZeitraum" VALUE="" SIZE="20">
        </TD>
        <TD width="53pi" ALIGN=LEFT><FONT COLOR=#00>-</FONT><FONT COLOR=#FFFFA0><B>DM</B></FONT></TD>        
        <TD ALIGN=CENTER colspan="2"><HR SIZE=3 WIDTH="170pi" COLOR="#FFFFA0"></TD>
    </TR>
</TABLE>
</FORM>

<P>
<TABLE><TR><TD></TD></TR></TABLE>
<TABLE><TR><TD></TD></TR></TABLE>

<table width="50%" align="center">
<tr><td>
    <ADDRESS>
    <FONT SIZE=3><FONT COLOR="#000000">
        &#169Copyright 1998: <B>Cyberjunkies</B><BR>
    </FONT>            
    </ADDRESS>
    <HR SIZE=4 COLOR="#800080">
    </td></tr>
</table>

<SCRIPT LANGUAGE="VBScript">
<!-- Option Explicit    
    Sub cmdInfo_Click()
        MsgBox "Beispiel:" & vbCrLf & "Jemand beschließt an seinem 18. Geburtstag, " &_
           "daß er an seinem 65. Geburtstag 1.000.000,- DM durch jährlich " &_
                     "nachschüssige Raten bei 6% Zinsen zusammengespart haben will. Er möchte " &_
                     "wissen, wie hoch die Jahresraten sein müssen, um das angestrebte Ziel " &_
                     "zu erreichen."  & vbCrLf & "Ergebnis: " &_
                     "4147,68 DM" & vbCrLf & "------------------" &_
                     "------------------------------------------------------------------" &_
                     "----------------------" & vbCrLf & "** SEHR WICHTIG! **" & vbCrLf & "Benutzen " &_
                     "Sie bei der Eingabe von Werten bitte ein " &_
               "Dezimalpunkt. Also z.B.: 12.55 und nicht! 12,55 " &_
                     "Das Ergebnis ist sonst nicht korrekt.", vbInformation, "Wichtige Programm-Information"
    End Sub
    
    Sub cmdLoeschen_Click()
        txtEndwert.Text = ""
        txtNominalZins.Text = ""     
      txtDauer.Text = ""        
    End Sub    
    
    Sub cmdZurueck_Click()
        Window.Location.Href="../HTMLHpSeiten/AxFinanzBsp.html#X"
    End Sub
-->
</SCRIPT>

</BODY>
</HTML>

Oh ho, I forget it!   Confused

[Image: Rentenraten2022-07-25.jpg]
Reply


Messages In This Thread
Calculator - by SierraKen - 07-24-2022, 10:21 PM
RE: Calculator - by SierraKen - 07-24-2022, 10:40 PM
RE: Calculator - by Coolman - 07-25-2022, 09:34 AM
RE: Calculator - by James D Jarvis - 07-25-2022, 01:05 PM
RE: Calculator - by Coolman - 07-25-2022, 01:43 PM
RE: Calculator - by OldMoses - 07-25-2022, 11:54 AM
RE: Calculator - by bplus - 07-25-2022, 01:28 PM
RE: Calculator - by SierraKen - 07-25-2022, 07:08 PM
RE: Calculator - by Kernelpanic - 07-25-2022, 09:49 PM
RE: Calculator - by SierraKen - 07-25-2022, 09:53 PM
RE: Calculator - by Kernelpanic - 07-25-2022, 10:24 PM
RE: Calculator - by bplus - 07-25-2022, 09:53 PM
RE: Calculator - by OldMoses - 07-28-2022, 12:41 AM
RE: Calculator - by Kernelpanic - 07-25-2022, 10:45 PM
RE: Calculator - by mnrvovrfc - 07-25-2022, 10:50 PM
RE: Calculator - by bplus - 07-25-2022, 11:10 PM
RE: Calculator - by SierraKen - 07-26-2022, 12:22 AM
RE: Calculator - by SierraKen - 07-26-2022, 04:09 PM
RE: Calculator - by bplus - 07-26-2022, 07:15 PM
RE: Calculator - by SierraKen - 07-26-2022, 09:05 PM
RE: Calculator - by SierraKen - 07-26-2022, 09:19 PM
RE: Calculator - by SierraKen - 07-27-2022, 03:11 AM
RE: Calculator - by Pete - 07-27-2022, 04:38 AM
RE: Calculator - by ChiaPet - 07-27-2022, 06:08 AM
RE: Calculator - by bplus - 07-27-2022, 11:51 AM
RE: Calculator - by ChiaPet - 07-28-2022, 03:54 PM
RE: Calculator - by SierraKen - 07-27-2022, 03:31 PM
RE: Calculator - by Kernelpanic - 07-27-2022, 05:34 PM
RE: Calculator - by Pete - 07-27-2022, 06:32 PM
RE: Calculator - by SierraKen - 07-27-2022, 08:02 PM
RE: Calculator - by Kernelpanic - 07-27-2022, 08:12 PM
RE: Calculator - by SierraKen - 07-27-2022, 08:12 PM
RE: Calculator - by Kernelpanic - 07-27-2022, 08:46 PM
RE: Calculator - by SierraKen - 07-27-2022, 09:27 PM
RE: Calculator - by Pete - 07-27-2022, 09:54 PM
RE: Calculator - by Jack - 07-27-2022, 10:26 PM
RE: Calculator - by Pete - 07-27-2022, 10:42 PM
RE: Calculator - by Pete - 07-27-2022, 11:21 PM
RE: Calculator - by SierraKen - 07-27-2022, 11:59 PM
RE: Calculator - by SierraKen - 07-28-2022, 10:11 PM
RE: Calculator - by Pete - 07-29-2022, 01:00 AM
RE: Calculator - by SierraKen - 07-29-2022, 08:30 PM
RE: Calculator - by Kernelpanic - 07-29-2022, 08:42 PM
RE: Calculator - by SierraKen - 07-29-2022, 08:45 PM
RE: Calculator - by SierraKen - 07-29-2022, 08:47 PM



Users browsing this thread: 13 Guest(s)