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






Create a for Loop

 

#include "stdafx.h"
#using <mscorlib.dll>

using namespace System;

int main(void) {
    int x;
    for (x=5; x<45; x+=5) {
        Console::WriteLine(x);
    }
    return 0;
}

   
  








Related examples in the same category