Horje
C++ generate a random letter Code Example
C++ generate a random letter
#include <iostream>

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;
}




Cpp

Related
how to check a number in string Code Example how to check a number in string Code Example
integer to char c++ Code Example integer to char c++ Code Example
Visual studio code include path not working c++ Code Example Visual studio code include path not working c++ Code Example
cpp get last element of vector Code Example cpp get last element of vector Code Example
string split by space c++ Code Example string split by space c++ Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
8