/*
generate current bill
bill = current meter bill - previous bill
*/
class bill
{
public static void main(String args[])
{
int current_reading = 100,
previous_reading = 50,
units = current_reading-previous_reading;
float bill=units*5;
System.out.println("units :"+units+"\nbill amount :"+bill);
}
}
output :
units :50
bill amount :250.0
generate current bill
bill = current meter bill - previous bill
*/
class bill
{
public static void main(String args[])
{
int current_reading = 100,
previous_reading = 50,
units = current_reading-previous_reading;
float bill=units*5;
System.out.println("units :"+units+"\nbill amount :"+bill);
}
}
output :
units :50
bill amount :250.0