Sirisha K

Sirisha K

  • NA
  • 454
  • 34.1k

JAVA

Mar 1 2016 10:17 AM

Convert a given number of bytes into a representation with metric units.A number of bytes given as a int value should be printed out with at most three digits before the decimal comma.

The ouput for four different values:

123 Byte are 123.0 Byte

15323 Byte are 15.323 KByte

15323000 Byte are 15.323 MByte

1532300001 Byte are 1.532300001 GByte

Note: Do not use iterations (only if-else).

How to write java code for above question?? 

Answers (3)