Created
May 4, 2016 19:27
-
-
Save lnsp/556594b8a1d79d37047360130553fe38 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Programm { | |
public static void main(String[] args) { | |
byte rang = 1; | |
short freunde = 2000; | |
int alter = 36; | |
long gehalt = 300000000; | |
double guthaben = 3.14; | |
float chance = 25.4235f; | |
char geschlecht = 'm'; | |
boolean lebend = true; | |
System.out.printf("Mein Rang ist %d und ich habe %d Freunde.\n", rang, freunde); | |
System.out.printf("Ich bin %d Jahre alt und verdiene %d pro Jahr.\n", alter, gehalt); | |
System.out.printf("Mein Guthaben beträgt %.2f und mein Glück liegt bei %.1f%%.\n", guthaben, chance); | |
System.out.printf("Ich bin %c (m = männlich, f = weiblich). Lebe ich? %s.\n", geschlecht, lebend); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment