// delete.cpp : 定义控制台应用程序的入口点。
//
#include "stdafx.h"
#include "windows.h"
int _tmain(int argc, _TCHAR* argv[])
{
char a;
HANDLE hcon;
hcon = GetStdHandle(STD_OUTPUT_HANDLE);
SetConsoleTextAttribute(hcon,FOREGROUND_RED|FOREGROUND_INTENSITY);
while (1)
{
scanf_s("%c", &a);
if (a < 'Z')
{
printf("%c\n", a);
}
else
{
a = a - 32;
printf("%c\n", a);
}
//printf("%d",'Z');
//if (a)
}
system("pause");
return 0;
}
温馨提示:答案为网友推荐,仅供参考