Hi,
I am having difficulty completing 7th last line below I marked the line with an arrow. Please explain me what is required here.
Thanks
Code:
int main(void) {
int MaxNum, /*number of random nos to generate */
i, /*index */
value,
RandNo, /*a random number */
ExitCode = 0 ; /*value to exit program with */
//----------------Start below here. To do: approximate lines of code = 7
// seed the random number generator with value 1 for repeatability
srand(1);
//set MaxNum to 3
MaxNum=3;
//for MaxNum times do the following
for(i=1;i<=MaxNum;i++){
//let RandNo be the next random number
RandNo = rand();
//print the random number in the format shown
printf("Random No %d is %d",i,RandNo);
//let value be the conversion of the random number to range 0 to 5, inclusive
value = RandNo%6;
printf("From zero to 5 that is %d\n", value);//
//let value be the conversion of the random number to range 'a' to 'z', inclusive
//--->
printf("From a to z that is %c\n", value);//
//----------------------End here. Please do not remove this comment. Reminder: no changes outside the todo regions.
printf("-------------------------------\n") ;
}
exit(ExitCode);
}