User Tools

Site Tools


Sidebar

Programming Reference/Librarys

Question & Answer

Q&A is closed







cpp:control_structures:while

while

    #include <iostream> /* including standard library */
 
    while ( condition == true ) {
    do something until condition untrue
    }

cpp Sourcecode Example

#include <iostream> /* including standard library */
 
using namespace std;
int main(void) {
    int i=0;
 
    while (i <= 99) {
        cout << i << endl;
        i++;
    }
    return 0;
}
  //output://
  
  0
  1
  2
  3
  4
  5
  6
  7
  ...
  up to 99

on the occasion of the current invasion of Russia in Ukraine

Russian Stop this War
cpp/control_structures/while.txt · Last modified: 2012/10/12 02:12 (external edit)

Impressum Datenschutz

Creating directory /kunden/homepages/20/d423760527/htdocs/cpp/data/meta/quickstats/10_2022 failed
Writing /kunden/homepages/20/d423760527/htdocs/cpp/data/meta/quickstats/10_2022/misc_data.ser failed
Creating directory /kunden/homepages/20/d423760527/htdocs/cpp/data/meta/quickstats/10_2022 failed
Writing /kunden/homepages/20/d423760527/htdocs/cpp/data/meta/quickstats/10_2022/ip.ser failed
Creating directory /kunden/homepages/20/d423760527/htdocs/cpp/data/meta/quickstats/10_2022 failed
Writing /kunden/homepages/20/d423760527/htdocs/cpp/data/meta/quickstats/10_2022/pages.ser failed
Creating directory /kunden/homepages/20/d423760527/htdocs/cpp/data/meta/quickstats/10_2022 failed
Writing /kunden/homepages/20/d423760527/htdocs/cpp/data/meta/quickstats/10_2022/ua.ser failed
Creating directory /kunden/homepages/20/d423760527/htdocs/cpp/data/meta/quickstats/10_2022 failed
Writing /kunden/homepages/20/d423760527/htdocs/cpp/data/meta/quickstats/10_2022/page_users.ser failed