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






Create a do-while Loop

 


#include "stdafx.h"
#using <mscorlib.dll>
using namespace System;
int main(void)
{
    int i;
    char c;
    int x=0;
    Console::WriteLine(x);
    ++x;
    i = Console::Read();
    
    c = (char)i;
    Console::WriteLine(c);
    // Get the cr/lf.
    i = Console::Read();
    i = Console::Read();
    return 0;
}

   
  








Related examples in the same category