Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class NumberMagnitude {
- public static void main(String[] args) {
- int value = 17;
- int k = value;
- int magnitude = 2;
- while(true) {
- k=(k/magnitude);
- (k<=1) { break; }
- magnitude++;
- }
- System.out.println("The magnitude of " + k + " equals " + magnitude);
- }
- }
Add Comment
Please, Sign In to add comment