vault backup: 2023-07-21 21:09:23
This commit is contained in:
19
Mathe/Ilias/Zusatz_Material/Reihe.java
Normal file
19
Mathe/Ilias/Zusatz_Material/Reihe.java
Normal file
@@ -0,0 +1,19 @@
|
||||
// Reihe.java
|
||||
import java.io.*;
|
||||
public class Reihe
|
||||
{
|
||||
public static void main(String[] args) throws IOException
|
||||
{
|
||||
double s=0.0,a_k=0.0;
|
||||
for (int k=0; k<=30; k++)
|
||||
{
|
||||
s=s+Math.pow(2.0/3.0,k); // geometrische Reihe q=2/3
|
||||
System.out.println("n = "+ k +" S_n = "+ s);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user