📅  最后修改于: 2022-03-11 14:44:49.980000             🧑  作者: Mango
#include
int main() {
srand(time(0));
std::cout <<"random uppercase = " << char('A' + rand() % 26) << std::endl;
// or
std::cout <<"random uppercase = " << char('a' + rand() % 26) << std::endl;
}