//LOWER 函数改写
#include<stdio.h>
#include<stdlib.h>
main()
{
int c;
c = 'a';
printf("%d", (c >= 'A'&&c <= 'Z') ? c + 'a' - 'A' : c);
system("pause");
}
书中函数原文如下
int lower(int c);
if(c>='A'&&c<='Z'
return c+'a'-'A';
else
return c;
//LOWER 函数改写
#include<stdio.h>
#include<stdlib.h>
main()
{
int c;
c = 'a';
printf("%d", (c >= 'A'&&c <= 'Z') ? c + 'a' - 'A' : c);
system("pause");
}
书中函数原文如下
int lower(int c);
if(c>='A'&&c<='Z'
return c+'a'-'A';
else
return c;