diff --git a/notebooks/xeus-cpp-lite-demo.ipynb b/notebooks/xeus-cpp-lite-demo.ipynb index 0b823c02..b32f7837 100644 --- a/notebooks/xeus-cpp-lite-demo.ipynb +++ b/notebooks/xeus-cpp-lite-demo.ipynb @@ -110,14 +110,10 @@ "execution_count": 4 }, { - "id": "ccf81e76-507a-42e5-9f83-99793f0eb46c", - "cell_type": "code", - "source": "# Interpreting the C++ programming language\n\nYou can define functions, classes, templates, etc ...", - "metadata": { - "trusted": true - }, - "outputs": [], - "execution_count": null + "id": "a39c7021-ee9f-442e-8ea3-63ca23aa5d46", + "cell_type": "markdown", + "source": "# Interpreting the C++ programming language\n# You can define functions, classes, templates, etc ...", + "metadata": {} }, { "id": "e5b116ce-ced1-4aa4-b14e-ef7d2606202e", @@ -577,9 +573,25 @@ "execution_count": 28 }, { - "id": "4557f440-c441-4f25-b461-9b4769f882a1", + "id": "73aa865d-f643-4b72-9701-f6e312914690", + "cell_type": "markdown", + "source": "# Taking input from the user", + "metadata": {} + }, + { + "id": "6efd2bbc-525a-4659-9431-aefc819e8cb7", + "cell_type": "code", + "source": "std::string name;\nstd::cin >> name;", + "metadata": { + "trusted": true + }, + "outputs": [], + "execution_count": null + }, + { + "id": "8ec65830-4cb5-4d01-a860-f6c46ac4f60f", "cell_type": "code", - "source": "", + "source": "std::cout << \"Your name is \" << name;", "metadata": { "trusted": true }, @@ -587,4 +599,4 @@ "execution_count": null } ] -} \ No newline at end of file +} diff --git a/notebooks/xeus-cpp.ipynb b/notebooks/xeus-cpp.ipynb index c75f1d1c..b670b566 100644 --- a/notebooks/xeus-cpp.ipynb +++ b/notebooks/xeus-cpp.ipynb @@ -842,16 +842,37 @@ ] }, { - "cell_type": "code", - "execution_count": null, - "id": "8e61d038-c7a6-4796-a6c6-d70c34ecd724", + "cell_type": "markdown", + "id": "92b12afd-2dbd-41df-acd0-25171c6dbb0d", "metadata": { "vscode": { "languageId": "c++" } }, + "source": [ + "# Taking input from the user" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "e9a85de0-df46-4850-b88a-4b752f29c1a4", + "metadata": {}, "outputs": [], - "source": [] + "source": [ + "std::string name;\n", + "std::cin >> name;" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "f95eece8-cd43-443e-8e27-9b901afefb20", + "metadata": {}, + "outputs": [], + "source": [ + "std::cout << \"Your name is\" << name;" + ] } ], "metadata": {