Its all over google in any language
code:
In Form_Load()
Randomize
End Sub
Public Function Rand(ByVal Low As Long, _
ByVal High As Long) As Long
Rand = Int((High - Low + 1) * Rnd) + Low
End Function
(Visual Basics)
code:
include <cstdlib>
#include <iostream>
using namespace std;
int main()
{
int random_integer = rand();
cout << random_integer << endl;
}
random_integer = (rand()%10);
(C++)
Notice the VB one makes sense while the C++ one just seems like a bunch of random jabber