Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.company;
- import java.util.Scanner;
- public class Main {
- public static int f1(int n) {
- int z = 1;
- for (int i = 1; i <= n; i++) {
- z = z * i;
- }
- return z;
- }
- public static int f2(int n) {
- int y = 1;
- if (n % 2 == 0) {
- for (int j = 1; j <= n - 1; j = j + 2) {
- y = y * j;
- }
- } else {
- for (int k = 2; k <= n - 1; k = k + 2) {
- y = y * k;
- }
- }
- return y;
- }
- public static void main(String[] args) {
- Scanner read=new Scanner(System.in);
- int n = read.nextInt();
- double t = f2(n)/(2*f1(n))+Math.sin(Math.tan(n))/(Math.log(f1(n)));
- System.out.println (t);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement