wood burning stoves 2.0
The moose likes Programming Diversions and the fly likes Nine 4s to make it  2000 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 » Other » Programming Diversions
Bookmark "Nine 4s to make it  2000" Watch "Nine 4s to make it  2000" New topic
Author

Nine 4s to make it 2000

Rakesh Joshi
Ranch Hand

Joined: Feb 24, 2006
Posts: 218
4 4 4 4 4 4 4 4 4 = 2000

There are nine 4s. Put any mathematical operator in the equation to make the target number of the equation equal to 2000.
can you make it more than one way


Life is a Game play it.
Rakesh Joshi
Ranch Hand

Joined: Feb 24, 2006
Posts: 218
Paul Clapham
Sheriff

Joined: Oct 14, 2005
Posts: 19747
    
  10

(4 x 4 x 4) / (.4 x .4 x .4) x sqrt(4) + 4 - 4
Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 20154
    
  46



Henry


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
Stefan Wagner
Ranch Hand

Joined: Jun 02, 2003
Posts: 1923

(4^4-4)*(4+4)-4*4+(4-4)

if ^ is accepted as a mathematical operator.
[ April 01, 2006: Message edited by: Stefan Wagner ]

http://home.arcor.de/hirnstrom/bewerbung
Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 20154
    
  46

Slight variation of Stefan's answer...



Henry
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Nine 4s to make it 2000
 
It's not a secret anymore!