作业帮 > 综合 > 作业

C++ 怎么比较字母的大小,或者直接把这道题回了吧1

来源:学生作业帮 编辑:作业帮 分类:综合作业 时间:2024/05/04 07:07:01
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.
#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]