ex2_12clr.cpp

来自「Visual C++ 2005的源代码」· C++ 代码 · 共 20 行

CPP
20
字号
// Ex2_12.cpp : main project file.
#include "stdafx.h"

using namespace System;

int main(array<System::String ^> ^args)
{
   int apples, oranges;                   // Declare two integer variables
   int fruit;                             // ...then another one

   apples = 5; oranges = 6;                 // Set initial values
   fruit = apples + oranges;                // Get the total fruit

   Console::WriteLine(L"\nOranges are not the only fruit...");
   Console::Write(L"- and we have ");
   Console::Write(fruit);
   Console::Write(L" fruits in all.\n");
   return 0;
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?