import java.util.Scanner;
public class Test40006 {
public static void main(String[] args) {
int ri, repeat;
int temp, flag;
double eps, item, sum;
Scanner in=new Scanner(System.in);
repeat=in.nextInt();
for(ri=1; ri=eps){
sum+=(((i%2==0)?1:-1)*item);
i++;
}
System.out.println((float)sum);
}
}
}
2021-10-17 23:01:22
21KB
java
题库
1