Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
Tutorialspoint

Bankkonto

public class Bankkonto {/* Dieses Programm bildet die Funktionen eines Geldautomaten ab*/
 public static void main(String[] args) {
  int kontostand = 30;
  int kreditlimit = -200; /* Betrag, um den das Konto maximal berzogen werden kann */
  
   int auszahlung = 30; /* Hier wird eigegeben, wieviel vom Konto abgehoben werden soll*/
   int kontostandNeu = kontostand - auszahlung;
  if (kontostand - auszahlung >= kreditlimit) {
System.out.println("Es werden " + auszahlung + " Euro ausbezahlt.");
                                    System.out.println("Ihr aktueller Kontostand betrgt " + kontostandNeu + " Euro");
  }                                      else {System.out.print ("Der Vorgang kann nicht ausgefhrt werden. Ihr Guthaben reicht leider nicht aus.");}
                                    
  }
}

Advertisements
Loading...

We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.