C++ 怎么比较字母的大小,或者直接把这道题回了吧11.Ask the user to enter a random word.If the word’s first letter is between H and Toutput “Between H and T.” otherwise output “Not between H and T”.Your output mustbe display
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/27 16:42:25
C++ 怎么比较字母的大小,或者直接把这道题回了吧11.Ask the user to enter a random word.If the word’s first letter is between H and Toutput “Between H and T.” otherwise output “Not between H and T”.Your output mustbe display
C++ 怎么比较字母的大小,或者直接把这道题回了吧1
1.Ask the user to enter a random word.If the word’s first letter is between H and T
output “Between H and T.” otherwise output “Not between H and T”.Your output must
be displayed in yellow.
C++ 怎么比较字母的大小,或者直接把这道题回了吧11.Ask the user to enter a random word.If the word’s first letter is between H and Toutput “Between H and T.” otherwise output “Not between H and T”.Your output mustbe display
#include
#include
using namespace std;
int main()
{
char str[30];
coutstr;
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_RED | FOREGROUND_GREEN);
if(str[0]>='H' && str[0]