• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Metadromes in Java

 
karan kampani
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI,
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.

Thanks
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Bartender
Posts: 1268
10
Eclipse IDE Google Web Toolkit Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic