{"id":1783,"date":"2024-09-12T08:00:00","date_gmt":"2024-09-12T06:00:00","guid":{"rendered":"https:\/\/www.fuhselab.de\/?p=1783"},"modified":"2025-05-28T07:12:15","modified_gmt":"2025-05-28T05:12:15","slug":"coding-workshop-02","status":"publish","type":"post","link":"https:\/\/www.fuhselab.de\/index.php\/2024\/09\/12\/coding-workshop-02\/","title":{"rendered":"Coding Workshop 02"},"content":{"rendered":"\n<p><br>Der Coding Workshop geht weiter und es soll eine kleine Dateneingabe und eine Datenausgabe programmiert werden&#8230;<\/p>\n\n\n\n<!--more-->\n\n\n\n<p><strong>Programmierung:<\/strong><\/p>\n\n\n\n<p>Mit folgenden Code soll nun ein Programm geschrieben werden, dass im Terminal eine Benutzereingabe einer Ganzzahl entgegen nimmt und dann in einer Meldung die eingegebene Zahl mitteilt.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#include &lt;iostream&gt;\nint main() \n{\nint Ganzzahl;\nstd::cout &lt;&lt; \"Benutzereingabe: \"; \nstd::cin &gt;&gt; Ganzzahl; \nstd::cout &lt;&lt; \"Sie haben \" &lt;&lt; Ganzzahl &lt;&lt; \" eingegeben.\"; \n}<\/code><\/pre>\n\n\n\n<p>Dieser Code wird als cpp-Datei (variable.cpp) abgespeichert.<\/p>\n\n\n\n<p><strong>Kompilierung des Codes:<\/strong><\/p>\n\n\n\n<p>Im Terminal wird nun folgendes eingegeben:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>g++ -o variable01.out variable.cpp<\/li>\n<\/ul>\n\n\n\n<p>Es wurde nun tats\u00e4chlich eine Output-Datei mit dem Namen \u201cvariable01.out\u201c erstellt und diese Datei kann nun per Terminal ausgef\u00fchrt werden.<\/p>\n\n\n\n<p><strong>Programm im Terminal ausf\u00fchren:<\/strong><\/p>\n\n\n\n<p>Nun wird die Output-Datei im Terminal ge\u00f6ffnet&#8230;<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>.\/variable01.out<\/li>\n<\/ul>\n\n\n\n<p>Das Programm macht tats\u00e4chlich das was es soll und nimmt eine Benutzereingabe entgegen und teilt nochmal mit welche Zahl vom Benutzer eingegeben wurde.<\/p>\n\n\n\n<p><strong>Ausblick:<\/strong><\/p>\n\n\n\n<p>In den n\u00e4chsten Wochen geht es mit Variablen weiter und Schritt f\u00fcr Schritt soll ein kleiner Taschenrechner programmiert werden&#8230;<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Der Coding Workshop geht weiter und es soll eine kleine Dateneingabe und eine Datenausgabe programmiert werden&#8230;<\/p>\n","protected":false},"author":1,"featured_media":543,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[33],"tags":[32],"class_list":["post-1783","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-coding-club","tag-coding-club-peine"],"_links":{"self":[{"href":"https:\/\/www.fuhselab.de\/index.php\/wp-json\/wp\/v2\/posts\/1783","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.fuhselab.de\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.fuhselab.de\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.fuhselab.de\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.fuhselab.de\/index.php\/wp-json\/wp\/v2\/comments?post=1783"}],"version-history":[{"count":2,"href":"https:\/\/www.fuhselab.de\/index.php\/wp-json\/wp\/v2\/posts\/1783\/revisions"}],"predecessor-version":[{"id":2841,"href":"https:\/\/www.fuhselab.de\/index.php\/wp-json\/wp\/v2\/posts\/1783\/revisions\/2841"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.fuhselab.de\/index.php\/wp-json\/wp\/v2\/media\/543"}],"wp:attachment":[{"href":"https:\/\/www.fuhselab.de\/index.php\/wp-json\/wp\/v2\/media?parent=1783"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.fuhselab.de\/index.php\/wp-json\/wp\/v2\/categories?post=1783"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.fuhselab.de\/index.php\/wp-json\/wp\/v2\/tags?post=1783"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}