题目
c++ 英文字母大小写转换
以下程式码是做英文字亩大小写转换
使用"库存函数"不知哪里出错了
另外
"副程式"也有些问题
麻烦帮我找出错误并修正
#include
#include
#include
void convert(char befor_ch);
int main(void){
char str[80];
gets(str);
printf("原始自符串 => %s\n" ,str);
//错误
printf("使用库存函数-自符串 => %s\n" ,tolower(str));
//错误
convert(str);
system("PAUSE");
return 0;
}
void convert(befor_ch){
if(befor_ch >= 'a' && befor_ch = 'A' && befor_ch
以下程式码是做英文字亩大小写转换
使用"库存函数"不知哪里出错了
另外
"副程式"也有些问题
麻烦帮我找出错误并修正
#include
#include
#include
void convert(char befor_ch);
int main(void){
char str[80];
gets(str);
printf("原始自符串 => %s\n" ,str);
//错误
printf("使用库存函数-自符串 => %s\n" ,tolower(str));
//错误
convert(str);
system("PAUSE");
return 0;
}
void convert(befor_ch){
if(befor_ch >= 'a' && befor_ch = 'A' && befor_ch
提问时间:2020-11-02
答案
#include
#include
#include
void convert(char * befor_ch);
int main(void)
{
int i;
char str[80];
gets(str);
printf("原始自符串 => %s\n" ,str);
printf("使用库存函数-自符串 =>");
for(i=0;str[i]!='\0';i++)
{
printf("%c" ,tolower(str[i]));
}
printf("\n");
convert(str);
system("PAUSE");
return 0;
}
void convert(char * befor_ch)
{
int i;
printf("使用副程式-自符串 =>");
for(i=0;befor_ch[i]!='\0';i++)
{
if(befor_ch[i] >= 'a' && befor_ch[i] = 'A' && befor_ch[i]
#include
#include
void convert(char * befor_ch);
int main(void)
{
int i;
char str[80];
gets(str);
printf("原始自符串 => %s\n" ,str);
printf("使用库存函数-自符串 =>");
for(i=0;str[i]!='\0';i++)
{
printf("%c" ,tolower(str[i]));
}
printf("\n");
convert(str);
system("PAUSE");
return 0;
}
void convert(char * befor_ch)
{
int i;
printf("使用副程式-自符串 =>");
for(i=0;befor_ch[i]!='\0';i++)
{
if(befor_ch[i] >= 'a' && befor_ch[i] = 'A' && befor_ch[i]
举一反三
已知函数f(x)=x,g(x)=alnx,a∈R.若曲线y=f(x)与曲线y=g(x)相交,且在交点处有相同的切线,求a的值和该切线方程.
我想写一篇关于奥巴马的演讲的文章,写哪一篇好呢?为什么好
奥巴马演讲不用看稿子.为什么中国领导演讲要看?
想找英语初三上学期的首字母填空练习……
英语翻译
最新试题
- 1梁启超教育思想
- 2相同的向量相减等于零还是等于向量零?为什么……
- 3这句话对吗?My classroom will be more beautiful than now to make us study better.
- 4o2的中2的含义
- 5努力就是光,成功就是影,没有光哪来的影?这句话的含义
- 6世界上咬合力最大的动物,
- 7函数f(x)对任意的a,b属于R恒有f(a+b)=f(a)+f(b)-1,当x>0时,f(x)>1,证明:1=1
- 8作文,迟了一分钟
- 9用长为1.4.4.5的四条线段为边作梯形,求这个梯形的面积 最好画图
- 10对于算式2(3+1)(32+1)(34+1)(38+1)(316+1)(332+1)+1的结果是几位数,个位是几?
热门考点