can someone pls tell me what is the damn error here?!!
package t6q6;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner input = new Scanner (System.in);
System.out.println("Please enter your account number.");
int account = input.nextInt();
System.out.println("Please enter P or R for Premium or Regular Service.");
String temp = input.nextLine();
char type = temp.charAt(0);
double total_price;
if (type == 'r' || type == 'R')
{
System.out.println("Please enter number of minutes you were using the system.");
double minutes;
minutes = input.nextDouble();
if (minutes>50)
{
total_price = (minutes-50)*0.20 - 10;
}
else
{
total_price = 0;
}
if (total_price > 10)
{
total_price = total_price - 10;
}
else
{
total_price = 0;
}
System.out.println("Service Type : Regular");
System.out.println("Account number : " + account);
System.out.println("Number of minutes service was used : " + minutes);
System.out.println("Total amount : " + total_price);
}
else if (type == 'p' || type == 'P')
{
System.out.println("Please enter the minutes you used the service from 6.00 A.M to 6.00 P.M");
double minute_day = input.nextDouble();
System.out.println("Please enter the minutes you used the service from 6.00 P.M to 6.00 A.M");
double minute_night = input.nextDouble();
if (minute_day > 75)
total_price = (minute_day-75)*0.10 - 25;
else
total_price = 0;
if (minute_night > 100)
total_price = total_price + (minute_night-100)*0.05 - 25;
System.out.println("Service Type : Premium");
System.out.println("Account number : " + account);
System.out.println("Number of minutes service was used : " + (minute_night+minute_day));
System.out.println("Total amount : " + total_price);
}
else
System.out.println("Please enter a valid character.");
}
}