{"id":1937,"date":"2024-10-31T08:00:00","date_gmt":"2024-10-31T07:00:00","guid":{"rendered":"https:\/\/www.fuhselab.de\/?p=1937"},"modified":"2024-09-26T07:14:43","modified_gmt":"2024-09-26T05:14:43","slug":"c-und-die-while-schleife","status":"publish","type":"post","link":"https:\/\/www.fuhselab.de\/index.php\/2024\/10\/31\/c-und-die-while-schleife\/","title":{"rendered":"C++ und die while-Schleife"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><br>In diesem C++ Webartikel geht es um die while-Schleife&#8230;<\/p>\n\n\n\n<!--more-->\n\n\n\n<p class=\"wp-block-paragraph\"><br><strong>Praxisbeispiel 1 f\u00fcr die while-Schleife:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#include &lt;iostream>\nint main() {\n\nunsigned i = 1;\nunsigned benutzer = 0;\n\nstd::cin >> benutzer;\n\nwhile (i &lt;= benutzer) {\nstd::cout &lt;&lt; i &lt;&lt; std::endl;\ni++;\n}\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><br>Das Programm funktioniert schon und z\u00e4hlt die Zahlen bis zur Benutzereingabe hoch. Leider fehlt dieser Datei wieder etwas Dialogtext mit dem Nutzer und der wird jetzt zugef\u00fcgt\u2026<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><br><strong>Praxisbeispiel 2 f\u00fcr die while-Schleife:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#include &lt;iostream>\nint main() {\n\nunsigned i = 1;\nunsigned benutzer = 0;\nstd::cout &lt;&lt; \"Bitte geben Sie eine Zahl ein und best\u00e4tigen Sie mit Enter...\\n\";\nstd::cin >> benutzer;\n\nwhile (i &lt;= benutzer) {\nstd::cout &lt;&lt; i &lt;&lt; std::endl;\ni++;\n}\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In diesem C++ Webartikel geht es um die while-Schleife&#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-1937","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\/1937","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=1937"}],"version-history":[{"count":1,"href":"https:\/\/www.fuhselab.de\/index.php\/wp-json\/wp\/v2\/posts\/1937\/revisions"}],"predecessor-version":[{"id":1938,"href":"https:\/\/www.fuhselab.de\/index.php\/wp-json\/wp\/v2\/posts\/1937\/revisions\/1938"}],"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=1937"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.fuhselab.de\/index.php\/wp-json\/wp\/v2\/categories?post=1937"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.fuhselab.de\/index.php\/wp-json\/wp\/v2\/tags?post=1937"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}