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??


Kashif SohailRank #1,613 · 967 reputationPosted Mar 11, 2016, 9:11 AM EST
Ranjan DailataRank #819 · 2.8K reputationPosted Mar 17, 2016, 4:01 AM EDT
Sirisha KRank #2,567 · 544 reputationPosted Mar 17, 2016, 4:05 AM EDT