首页上一页 1 下一页尾页 1 条记录 1/1页
第2章第4语法错误
发表在C语言图书答疑
2015-08-21
是否精华
是
否
版块置顶:
是
否
源码是
#include "stdafx.h"
using namespace _System;
int main(array<System::string ^> ^args)
{
int num;
string ^Result;
system::console::writeLine (L"请输入一个整数:");
num = Int32::parse(System::Console::ReadLine());
Result = (num % 2 == 0) ? "是偶数" : "是奇数";
System::consple::WriteLine(num + Result);
return 0;
}
#include "stdafx.h"
using namespace _System;
int main(array<System::string ^> ^args)
{
int num;
string ^Result;
system::console::writeLine (L"请输入一个整数:");
num = Int32::parse(System::Console::ReadLine());
Result = (num % 2 == 0) ? "是偶数" : "是奇数";
System::consple::WriteLine(num + Result);
return 0;
}