import java.io.*;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
System.out.print("Enter total number of overs: ");
int a = s.nextInt();
System.out.print("Enter target Runs: ");
int b = s.nextInt();
System.out.print("Enter overs bowled");
int c = s.nextInt();
System.out.println("Enter runs scored");
int d = s.nextInt();
double e = d / c;
float f = (b - d) / (a - c);
double g = 250 / 40;
System.out.println("\nName: " + e);
System.out.printf("%.2f", f);
System.out.println("ans" + g);
}
}
This is progam to estimate the run rate and the runrate required in cricket. when i find the average the number after decimal is shown as .0 ie. if the answer is 6.25 it gets displayed as 6.00 can you please help me rectify this
thanks in advance