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

add

parent 5c4a092a
......@@ -22,20 +22,20 @@
"metadata": {
"collapsed": true,
"slideshow": {
"slide_type": "slide"
"slide_type": "subslide"
}
},
"source": [
"# ตัวเลขและความคลาดเคลื่อนในโปรแกรม\n",
"## C++\n",
"## Java\n",
"\n",
"```c++\n",
"#include <iostream>\n",
"using namespace std;\n",
"main() {\n",
" float x = 1.0; \n",
"```java\n",
"public class Test {\n",
" public static void main(String[] a) {\n",
" float x = 1.0;\n",
" float y = x / 3.0;\n",
" cout << ((x == y * 3.0)?\"\": \"Not\") << \" Equal\" << endl;\n",
" System.out.println( ((x == y * 3.0)?\"\": \"Not\") + \" Equal\" );\n",
" }\n",
"}\n",
"```\n"
]
......@@ -45,20 +45,20 @@
"metadata": {
"collapsed": true,
"slideshow": {
"slide_type": "subslide"
"slide_type": "slide"
}
},
"source": [
"# ตัวเลขและความคลาดเคลื่อนในโปรแกรม\n",
"## Java\n",
"## C++\n",
"\n",
"```java\n",
"public class Test {\n",
" public static void main(String[] a) {\n",
" float x = 1.0;\n",
"```c++\n",
"#include <iostream>\n",
"using namespace std;\n",
"main() {\n",
" float x = 1.0; \n",
" float y = x / 3.0;\n",
" System.out.println( ((x == y * 3.0)?\"\": \"Not\") + \" Equal\" );\n",
" }\n",
" cout << ((x == y * 3.0)?\"\": \"Not\") << \" Equal\" << endl;\n",
"}\n",
"```\n"
]
......@@ -233,7 +233,7 @@
},
{
"cell_type": "code",
"execution_count": 15,
"execution_count": null,
"metadata": {
"slideshow": {
"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