Create a while Loop : while « Statement « Visual C++ .NET






Create a while Loop

 


#include "stdafx.h"
#using <mscorlib.dll>
using namespace System;
int main(void)
{
    int x;
    x=0;
    while((++x)<10)
    {
        Console::WriteLine(x);
    }
    return 0;
}

   
  








Related examples in the same category