Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

The first time I saw this code, I was amazing!


Jun 02, 2021 Article blog



Some powerful code, will let people see straight exclaiming as heavenly man. There are many algorithms for calculating Pi, some code can be worked out quickly, and some code, although not the fastest to calculate Pi, but it is the most powerful code in the world, which is the following code.

 The first time I saw this code, I was amazing!1

Some netizens posted such a piece of code on the question-and-answer platform, said to be from the 1988 IOCCC contest, and is the algorithm for calculating Pi. W here OO is diameter, FF is area, and Pi is 4 area/diameter/diameter.

This code in the end how to write, is not really powerful, see how netizens answer.

Netizen I: This code is written, out of all constraints, has reached the realm of doing whatever you want.

Netizen 2: This is calculated with the area occupied by the code pi.

Netizen 3: Draw a circle with a radius of eight (actually a positive octagon), and then S-Pi T he value of the area is the number of figures in which the figure is filled. Feeling is the correct application of rounding.

 The first time I saw this code, I was amazing!2

Netizen 4: #define inside what it means.

Netizen 5: There are no books on hand. Remember is a exercise, ask this code is what, you can search for code snippets.

Netizen five: blessed!

It seems that some of these netizens do not understand. T his is also normal, after all, everyone's opinion is different. And some programming bulls, still understand.

There are netizens to share a piece of code, it is said that when the lord first saw this code, directly lamented that they are too honest, what is going on? Look directly at the code!

 The first time I saw this code, I was amazing!3

Why does the Lord feel that seeing this code, feel too honest, see how netizens understand!

Netizen I: Duff equipment. Remember it's an abacus exercise.

Netizen 2: In fact, it is a common assembly technique used in c language.

 The first time I saw this code, I was amazing!4

Net three: concise and clear explanation, praise! BTW fix bug: 8 times in the first round.

Netizen four: just 8 times at a glance can see that I did not specifically describe it. The more characteristic first loop is not performed 8 times.

The above two lines of code, do not know how you Daniel feel, is not like the landlord said, surprised by heavenly people? I don't know if you guys understand? Whether you see it or not, you can leave a message in the comments section.

 The first time I saw this code, I was amazing!5

Learn programming techniques, go to W3Cschool, if you like our article, you can click on the upper right corner to follow us; If you want to see more information about the IT world, you can add our public number.

Public number: w3cschoolcn