#include "stdafx.h"
#using <mscorlib.dll>
using namespace System;
int main(void)
{
Console::WriteLine("Enter a letter:");
int i = Console::Read();
char c = (char) i;
if (c == 'a')
Console::WriteLine("c == a");
else if (c == 'b')
Console::WriteLine("c == b");
else if (c == 'c')
Console::WriteLine("c == c");
else
Console::WriteLine("c is invalid");
return 0;
}
|