Q8. A hotel is giving seasonal discount on the total amount to be paid by the person staying at the time of check out. The charges for one day stay is 850.0 per room. The discount will be given as per the following criteria: Number of days stayed Discount on total amount Upto 5 days 10% > 5 days and <= 10 days 15% > 10 days and <= 20 days 20% More than 20 days 25% Write a program to input name of guest, total number of days stayed in the hotel. Calculate the total amount to be paid and discount amount. Find the net balance to be paid excluding the discount. Print the bill including all the data.
Answers
Answered by
3
Answer:
Explanation:
(e) The following program prints out the pattern given below: [2] 2 ... A hotel is giving seasonal discount on the total amount to be paid by the ... The charges for one day stay is `850.0 per ...
Answered by
4
Answer:
Idk if its correct:
Explanation:
import java.util.*;
public class MyClass {
public static void main(String args[]) {
int a, b, c, d, e;
System.out.println("Enter number of days");
Scanner in = new Scanner(System.in);
a = in.nextInt();
if(a<=5)
{
b=10;
}
else if(a<=10&&a>5){
b=15;
} else if(a<=20&&a>10){
b=20;
}
else if(a>20)
b=25;
else{
System.out.println("Input a proper number");
b=0;
}
c=a*850;
d=b/100;
e=c*d;
c=c-e;
System.out.println(c);
}
}
Similar questions