10-16-2024, 06:16 PM
(This post was last modified: 10-16-2024, 07:28 PM by Kernelpanic.)
Interesting thing. But IMP is not completely useless.
Example of how logical operators can be used to decide on the creditworthiness of a loan applicant.
PS: For better understanding
Example of how logical operators can be used to decide on the creditworthiness of a loan applicant.
Code: (Select All)
'Beispiel fuer logischen Operator IMP; S. 88 - 16. Okt. 2024
'Die Antwort hat keine Auswirkung, nur Kredithoehe zu Monatsverdienst.
'The answer has no effect, only the loan amount is related to monthly income. A mistake?
Screen _NewImage(800, 400, 32)
Option _Explicit
Dim As Double kreditHoehe, monatsVerdienst
Dim As String antwort
Locate 3, 3
Print "Kreditantrag" 'Loan application
Locate 4, 3
Print "============"
Locate 6, 3
Input "Hoehe des gewuenschten Kredits : ", kreditHoehe 'Amount Of desired loan
Locate 7, 3
Input "Arbeitet der Antragsteller in Vollzeit(Ja/Nein)?: ", antwort 'Is the applicant working full-time?
Locate 8, 3
Input "Wie hoch ist der Monatsverdienst? : ", monatsVerdienst 'Monthly earnings
'Since the applicant is employed full-time, the loan application is approved in the amount of
If kreditHoehe > monatsVerdienst Imp UCase$(antwort) = "Ja" Then
Locate 10, 3
Print "Da der Antragsteller einer Vollzeitbeschaeftigung nachgeht,"
Locate 11, 3
Print Using "wird der Kreditantrag in Hoehe von ###,###.## Euro genehmigt."; kreditHoehe
'The applicant does not meet the conditions for a loan of ... The application is denied.
Else
Beep
Locate 10, 3
Print Using "Der Antragsteller erfuellt die Bedingungen fuer einen Kredit in Hoehe von ###,###.## nicht."; kreditHoehe
Locate 11, 3
Print "Der Antrag wird abgelehnt."
End If
End
PS: For better understanding