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 cost = 0; DecimalFormat df = new DecimalFormat("0.00"); if((x <= 50)&(x >= 0)){ cost = 0.53*x; }if(x > 50){ cost = 0.53*50+(x-50)*(0.05+0.53); }else if(x < 0){ System.out.println("Invalid Value!"); } System.out.println("cost = "+df.format(cost)); }}