• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to find the closest square number of the given Input

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Please give me the program for following ouput,

Input =10, output=9(Square of 3)

Input=160, output=169(square of 13)
 
Rancher
Posts: 2759
32
Eclipse IDE Spring Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
can you use Math class, or do you have to do it without Math?
 
lowercase baba
Posts: 13089
67
Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

kumar nandha wrote:
Please give me the program for following ouput


We don't do that. Nobody here should give you the code. We will HELP you do it, but YOU have to do it.

All programming tasks start the same way. First, walk away from your computer. Then, get some paper and pencils, and a large eraser, and start writing out in English (or any other natural language you prefer) how YOU would do it. No java terms. No computer terms. Just words. Pretend you are trying to tell a child what needs to be done, remembering they are VERY literal.

You can start off with broad steps, but then refine them until they are more and more specific.

After you've refined them 3-4 times, then you should start seeing what needs to be done in any specific language, and you work from there.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic