用C ++编写一个程序来输入一个字母并将其转换成相反的情况(大写或小写)。使用条件运算符或if ... else语句。 [英] Write a program in C++ to enter an alphabet and convert it into its opposite case(lower or upper case). Use the conditional operator or if...else statements.

查看:279
本文介绍了用C ++编写一个程序来输入一个字母并将其转换成相反的情况(大写或小写)。使用条件运算符或if ... else语句。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试过这样做,但每次程序都将大写字母转换为小写字母,但不会这样做。



我尝试了什么:



我试过这样做,但每次程序将大写字母转换成小写但不会这样做。

I tried doing it but every time the program converts the uppercase into lowercase but it does not do the otherwise.

What I have tried:

I tried doing it but every time the program converts the uppercase into lowercase but it does not do the otherwise.

推荐答案

1。测试角色是否是大写或小写。

2.现在做任何必要的事情。
1. Test the character to see if it is upper or lower case.
2. Now do whatever is necessary.


这篇关于用C ++编写一个程序来输入一个字母并将其转换成相反的情况(大写或小写)。使用条件运算符或if ... else语句。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆