public class Main {
static double terabytesToPetabytes(long terabytes) {
return terabytes / 1024.0;
}
public static void main(String[] args) {
int tb1 = 1398;
int tb2 = 10;
System.out.printf("%.2fPB%n", terabytesToPetabytes(tb1));
System.out.printf("%.4fPB%n", terabytesToPetabytes(tb2));
}
}
/*
run:
1.37PB
0.0098PB
*/