package com.company; import java.text.DecimalFormat; import java.util.Scanner; public class Main { public static void main(String[] args) { // write your code here Scanner sc=new Scanner(System.in); double x=sc.nextDouble(); double result; DecimalFormat df=new DecimalFormat("0.0"); if(x!=10){ result=x; }else{ result=1/x; } System.out.println("f("+df.format(x)+") = "+df.format(result)); } }