public class reihe { public static void main(String[] args){ System.out.println("Sinus(s) oder Cosinus(c)?"); char wahl = Input.in.readCharacter(); System.out.println("Geben sie x ein!"); double x = Input.in.readDouble(); double epsilon = 0.01; switch (wahl) { case 's': System.out.println("Die Abschätzung für sin("+x+") ist" + sinus(x,epsilon));break; case 'c': System.out.println("Die Abschätzung für cos("+x+") ist" + cosinus(x,epsilon));break; default: System.out.println("Ungültige Eingabe!");break; } } public static double sinus(double x, double epsilon){ int k = 0; boolean check = false; double summe = 0; double letztesumme =0; while(check == false) { summe += Math.pow(k,-1)*Math.pow(x, (2*k)+1)/fac((2*k)+1); if(Math.abs(summe-letztesumme)