Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void main (String[] args) {System.out.println(Approximation2);}
- int Fakultät_berechnen(int n){
- int fakultät = 1;
- if (n == 0){
- fakultät = 1;
- }
- for(int zahl=1; zahl<=n; zahl++){
- fakultät = fakultät * zahl;
- }
- return fakultät;
- }
- int EulerscheZahl_berechnen (int n){
- int Approximation2 = 0;
- for (int Approximation1=0; Approximation1 == n; Approximation1++){
- int Approximation;
- Approximation = 1/Fakultät_berechnen(Approximation1);
- Approximation2 = Approximation1 + Approximation2;
- }
- return Approximation2;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement