jQuery in Action, 3rd edition
The moose likes Beginning Java and the fly likes Metadromes in Java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Metadromes in Java" Watch "Metadromes in Java" New topic

Metadromes in Java

karan kampani

Joined: Sep 08, 2009
Posts: 2
Im new to Java and I am trying to write a program that inputs an integer and finds the largest number less than the number entered. Im not sure if its a metadrome but here's an example, if I enter the number 1945 then the output should be 1789
Im new to the language so i posted in this section.

David Newton

Joined: Sep 29, 2008
Posts: 12617

finds the largest number less than the number entered

I think there must be a bit more to the definition than that, otherwise you could just subtract one.

Here's one definition I found:
A metadrome is a number whose hexadecimal digits are in strict ascending order.
karan kampani

Joined: Sep 08, 2009
Posts: 2
Yea that the definition which I found as well. but im not sure if that's what I need to use for the program. Im stuck with the algorithm for the code, thats the problem
salvin francis
Ranch Hand

Joined: Jan 12, 2009
Posts: 928

Karan, we do not do your homework.

Please provide us with what you have tried so far and we can help you.

one last thing,

Welcome to coderanch

My Website: [Salvin.in] Cool your mind:[Salvin.in/painting] My Sally:[Salvin.in/sally]
I agree. Here's the link: http://aspose.com/file-tools
subject: Metadromes in Java
It's not a secret anymore!