/************************************************************************ * * * Copyright Digital Equipment Corporation 1998. All rights reserved. * * * * Restricted Rights: Use, duplication, or disclosure by the U.S. * * Government is subject to restrictions as set forth in subparagraph * * (c) (1) (ii) of DFARS 252.227-7013, or in FAR 52.227-19, or in FAR * * 52.227-14 Alt. III, as applicable. * * * * This software is proprietary to and embodies the confidential * * technology of Digital Equipment Corporation. Possession, use, or * * copying of this software and media is authorized only pursuant to a * * valid written license from Digital or an authorized sublicensor. * * * ************************************************************************/ /* chap_3_conv_upperlower.c */ /* This program uses the functions toupper and tolower to */ /* convert uppercase to lowercase and lowercase to uppercase */ /* using input from the standard input (stdin). */ #include #include /* To use EOF identifier */ #include main() { char c, ch; while ((c = getchar()) != EOF) { if (c >= 'A' && c <= 'Z') ch = tolower(c); else ch = toupper(c); putchar(ch); } }