can any one please tell me am i done my question right?
my question is to store store 1035 to 1265 random in a character array and display the array.
and im not sure whats this srand is doing?
#include<iostream>
#include<stdlib>
#include<conio.h>
int main(){
srand(1035);
char b[30];
for(int i=0;i<30;i++) {
b[i]=(1+rand()%(1265));
}
for(int i=0;i<10;i++) {
cout<<b[i];
}
getch();
return 0;}