1.Split the bill
BeginnerA dinner costs 1850 rupees and 4 friends split it equally. Print each share with exactly two decimal places, like Each person pays 462.50.
Show hint
Divide as a double, and format with System.out.printf("%.2f%n", value).
Show solution
public class Main {
public static void main(String[] args) {
double total = 1850;
int people = 4;
System.out.printf("Each person pays %.2f%n", total / people);
}
}Each person pays 462.50