Commit 567a5d72 authored by KANTAPONG SONG-NGAM's avatar KANTAPONG SONG-NGAM

add

parent 5c4a092a
...@@ -22,20 +22,20 @@ ...@@ -22,20 +22,20 @@
"metadata": { "metadata": {
"collapsed": true, "collapsed": true,
"slideshow": { "slideshow": {
"slide_type": "slide" "slide_type": "subslide"
} }
}, },
"source": [ "source": [
"# ตัวเลขและความคลาดเคลื่อนในโปรแกรม\n", "# ตัวเลขและความคลาดเคลื่อนในโปรแกรม\n",
"## C++\n", "## Java\n",
"\n", "\n",
"```c++\n", "```java\n",
"#include <iostream>\n", "public class Test {\n",
"using namespace std;\n", " public static void main(String[] a) {\n",
"main() {\n", " float x = 1.0;\n",
" float x = 1.0; \n", " float y = x / 3.0;\n",
" float y = x / 3.0;\n", " System.out.println( ((x == y * 3.0)?\"\": \"Not\") + \" Equal\" );\n",
" cout << ((x == y * 3.0)?\"\": \"Not\") << \" Equal\" << endl;\n", " }\n",
"}\n", "}\n",
"```\n" "```\n"
] ]
...@@ -45,20 +45,20 @@ ...@@ -45,20 +45,20 @@
"metadata": { "metadata": {
"collapsed": true, "collapsed": true,
"slideshow": { "slideshow": {
"slide_type": "subslide" "slide_type": "slide"
} }
}, },
"source": [ "source": [
"# ตัวเลขและความคลาดเคลื่อนในโปรแกรม\n", "# ตัวเลขและความคลาดเคลื่อนในโปรแกรม\n",
"## Java\n", "## C++\n",
"\n", "\n",
"```java\n", "```c++\n",
"public class Test {\n", "#include <iostream>\n",
" public static void main(String[] a) {\n", "using namespace std;\n",
" float x = 1.0;\n", "main() {\n",
" float y = x / 3.0;\n", " float x = 1.0; \n",
" System.out.println( ((x == y * 3.0)?\"\": \"Not\") + \" Equal\" );\n", " float y = x / 3.0;\n",
" }\n", " cout << ((x == y * 3.0)?\"\": \"Not\") << \" Equal\" << endl;\n",
"}\n", "}\n",
"```\n" "```\n"
] ]
...@@ -233,7 +233,7 @@ ...@@ -233,7 +233,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 15, "execution_count": null,
"metadata": { "metadata": {
"slideshow": { "slideshow": {
"slide_type": "skip" "slide_type": "skip"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment