Download as:
Rating : ⭐⭐⭐⭐⭐
Price: $10.99
Language:EN
Pages: 7
Words: 668

Count double totalprice avragep

* To change this template file, choose Tools | Templates

* and open the template in the editor.

/**

*

* @param args the command line arguments

*/

int numP=0, numBooking, count=0;

double TotalPrice =85.50,AvrageP = 0, TotalAmount =0;

boolean empty = true,lessZ=true;

int minP = 1000, maxP = -1;

{

empty = false;

numBooking--;

//System.out.println("dfdsfd"+name1+"dfdfd");

empty = true;

System.out.println("ERROR booking name cannot be blank ");

System.out.print("Enter the number of passenger for "+ name1+" : ");

numP = sc.nextInt();

}

else

minP=numP;

minName = name1;

maxName = name1;

}

{

TotalPrice = TotalPrice-(TotalPrice*0.1);

}

else if(numP>10)

}

}

TotalPrice = 85.50;

// System.out.println(numBooking);

System.out.println("Booking: "+maxName+"has the maximum number of "+maxP+" Passengers");

System.out.println("Average Number of passenger per Booking is: "+f.format(AvrageP )+" Passengers");

OutPut : -

Copyright © 2009-2023 UrgentHomework.com, All right reserved.