Computer Science, asked by DrStudy, 1 year ago

write a program that calculates the capacity of an automobile fuel tank in litres, and the kilometres per litre that the automobile can be driven (KPL) the program outputs the number of kilometres the automobile can be given without refueling.​

Answers

Answered by kirti222
0

Import java.util.Scanner;

public class Mileage

{

public static void main(String[] args)

{

Scanner sc = new Scanner(System.in);

System.out.print("Enter capacity of automobile in litres: ");

double cap = sc.nextDouble();

System.out.print("\nEnter the mileage in kilometres per litre: ");

double mil = sc.nextDouble();

System.out.println("\nThe automobile can cover "+(cap*mil)+" kilometres distance on a full tank.");

}

}

please mark it as a brainlist please plz plz plz

Similar questions