#include<iostream>
      #include<time.h>
      #include<stdlib.h>
      
      #define MAX_NUM 10
      using namespace std;
      void randNum(){
        int random;
        srand(time(NULL));
        for(int i = 0; i < 10; i++){
          random = rand()%MAX_NUM;
          cout << random << endl;
        }
      }
      

      Cpp language logo
      Generate random number

      Codiga's C++ Recipes

      Random number generator

      0 Comments

        Add Comment

        Log in to add a comment

        Codiga - All rights reserved 2022.