random 1 diem tren man hinh bang dev c

#include <iostream>
#include <cstdlib>
#include <ctime>

int main() {
    // Step 1: Seed the random number generator with the current time
    std::srand(std::time(0));

    // Step 2: Generate a random number between 1 and 10
    int random_number = std::rand() % 10 + 1;

    // Step 3: Output the random number to the console
    std::cout << "Random number: " << random_number << std::endl;

    // Step 4: Return 0 to indicate successful completion
    return 0;
}