N-body problem: Difference between revisions

Content added Content deleted
Line 1,507: Line 1,507:
</syntaxhighlight>
</syntaxhighlight>


<syntaxhighlight lang="bash">
Input file is nbody-file:
Input file is nbody-file:
0.0100 003 020
0.0100 003 020
1.0000
1.0000
+0.0000 +0.0000 +0.0000
+0.0000 +0.0000 +0.0000
+0.0100 +0.0000 +0.0000
+0.0100 +0.0000 +0.0000
0.1000
0.1000
+1.0000 +1.0000 +0.0000
+1.0000 +1.0000 +0.0000
+0.0000 +0.0000 +0.0200
+0.0000 +0.0000 +0.0200
0.0010
0.0010
+0.0000 +1.0000 +1.0000
+0.0000 +1.0000 +1.0000
+0.0100 -0.0100 -0.0100
+0.0100 -0.0100 -0.0100




Test:
Test:

<syntaxhighlight lang="bash">
Compile and Test
Compile and Test
C:\GnuCOBOL> cobc -x -O2 nbody.cbl
C:\GnuCOBOL> cobc -x -O2 nbody.cbl


execute: ./nbody
execute: ./nbody