why surf the web ? swim it !!!


One of the latest trends in the world

Solving 8÷2(2+2)

As you all argue about whether the answer is 16 or 1 on the internet, let’s ask some of the popular programming languages and even GOOGLE calculator the answer.

THE

ANSWER

IS

1

GODAMMIT

ACCEPT THE FACT AND FOLLOW THE EXPLANATION BELOW

#JAVA:

The compiler throws an error for the equation 8÷2(2+2)

prog.java:7: error: ')' expected
        System.out.println(8/2(2+2));
                              ^
prog.java:7: error: not a statement
        System.out.println(8/2(2+2));
                                ^
prog.java:7: error: ';' expected
        System.out.println(8/2(2+2));
                                  ^
3 errors

https://ide.geeksforgeeks.org/7ZMrSyIWJZ – Complete program here

C:

The compiler throws an error again

prog.c: In function 'main':
prog.c:4:11: error: called object is not a function or function pointer
  printf(8/2(2+2));
           ^

https://ide.geeksforgeeks.org/P3pAEva0iC – Complete program here

C++:

COMPILER ERROR !!!!!!

prog.cpp: In function 'int main()':
prog.cpp:5:15: error: expression cannot be used as a function
  cout<<8/2(2+2);
               ^

https://ide.geeksforgeeks.org/fGd9X6HZHL – Complete program here

#PYTHON:

AGAIN !!!!

Traceback (most recent call last):
  File "/home/8c11cbf85a42a9def90843b6f8c83a11.py", line 2, in 
    print(8/2(2+2))
TypeError: 'int' object is not callable

https://ide.geeksforgeeks.org/CrVCZwx5yc – Complete program here

#PYTHON3:

It’s the same…

Traceback (most recent call last):
  File "/home/0be0c7f603d1fd9f6c8acf90fb022c44.py", line 2, in 
    print(8/2(2+2))
TypeError: 'int' object is not callable

https://ide.geeksforgeeks.org/4WOLzNfVtx – Complete program here

#JAVASCRIPT:

Something unexpected happens here, the program stops and RETURN NO OUTPUT!!!

Uncaught TypeError: 2 is not a function
at <anonymous>:2:52
at render (1sgpfVHK8n:206)
at 1sgpfVHK8n:174
at dispatch (jquery.js:4435)
at r.handle (jquery.js:4121)

https://ide.geeksforgeeks.org/tryit.php/1sgpfVHK8n – Complete program here

#GOOGLE CALCULATOR:

So here’s where the INTERNET arguing that the GOOGLE CALCULATOR gives 16

(Oh MAN, how’s that possible!!!)

But the GOOGLE CALCULATOR converts the equation as (8/2)*(2+2) even if you insert 8÷2(2+2)

8÷2(2+2) -> (8/2)*(2+2) is how people getting the answer 16

ACTUAL ANSWER, HOW YOU GET 1:

Solve X/Y(Y+Y) equation you’ll get X/2Y²

Now Substitute X=8 and Y=2

8dividedmeme

Thanks to GEEKS FOR GEEKS – ONLINE IDE

One response

  1. Lolgastore Avatar

    If you’re looking for all the upcoming ANimal Crossing: New Horizons events, look no further. Below, you’ll find a constantly updated list of all confirmed events happening in the game, so consider this Animal Crossing Items your Animal Crossing: New Horizons calendar.
    There are always regular events like monthly bug and fishing tournaments, but the game is still establishing when these events will lie – whether it’s the second or third saturday of a month for example.
    See below for all the confirmed upcoming ANimal Crossing: New Horizons events so far:
    What is it? The only time period where the spring blossom blooms. Pretty, and creative!
    Things to watch out for: There are a selection of Animal Crossing: New Horizons https://www.lolga.com/animal-crossing-items cherry blossom recipes to collect by popping floating balloons, which will all only be available during this season.
    Hemisphere: North and South
    What is it? The Animal Crossing: New Horizons Bunny Day event actually runs from April 1 – 12, but the actual Bunny Day – aka Easter Sunday – happens on Sunday April 12.
    Things to watch out for: Zipper T. Bunny will gift anyone who collects all the Animal Crossing: New Horizons Bunny Day recipes, and you’ll be able to find six types of Animal Crossing: New Horizons eggs dotted around the island, which you’ll need to craft the aforementioned recipes.
    Hemisphere: North and South
    What is it? One of the originally confirmed Animal Crossing: New Horizons http://www.lolga.com events is Earth Day. In real life, this event takes place on April 22, so expect the same to happen in-game.
    Things to watch out for: It’s not clear what will happen on the day, but it will be run by Leif the Sloth, who used to run the Garden Centre in previous games.

    Like

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Discover more from Why Surf Swim

Subscribe now to keep reading and get access to the full archive.

Continue reading