In: Computer Science
Java programming :
Your task is to create an application that takes orders for beach holidays, calculates, and displays the total cost.
Cost is $100 per day for accommodation
Wind surfing rental is $50 per day (not optional)
Sales tax is 7 %
The orders for this application will be how many days they wanna spend at the resort and for how many days do they want the wind surfing rental.
import java.util.*;
public class MyApp {
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
System.out.println("Enter How may days they wanna spend at resort?");
int days;
days=sc.nextInt();
System.out.println("Enter How many days do they want the wind surfing?");
int days2;
days2=sc.nextInt();
double cost=100*days+50*days2;
double sales_tax=cost*7.0/100;
double total_cost=cost+sales_tax;
System.out.println("Total Cost is :$"+total_cost);
}
}
