topical media & game development
basic-program-code-03-Ex3-15.c
? /
basic-program-code-03-Ex3-15.c
// Ex3_15.cpp : main project file.
include <stdafx.h>
using namespace System;
int main(array<System::String ^> ^args)
{
wchar_t letter; // Corresponds to the C++/CLI Char type
Console::Write(L"Enter a letter: ");
letter = Console::Read();
if(letter >= 'A') // Test for 'A' or larger
if(letter <= 'Z') // Test for 'Z' or smaller
{
Console::WriteLine(L"You entered a capital letter.");
return 0;
}
if(letter >= 'a') // Test for 'a' or larger
if(letter <= 'z') // Test for 'z' or smaller
{
Console::WriteLine(L"You entered a small letter.");
return 0;
}
Console::WriteLine(L"You did not enter a letter.");
return 0;
}
(C) Æliens
20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.