Testing

+1 Bucky Roberts · August 10, 2014

#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <string.h>
#include <math.h>


int main()
{
   int i;
   int diceRoll;


   for(i=0; i<20; i++){
       //returns a random integer from 0 to 32767
       printf("%d \n", rand() );
       //returns a number 1-6
       diceRoll = ( rand()%6 ) + 1;
       printf("You rolled a %d \n", diceRoll );
   }


   return 0;
}

Post a Reply

Replies

Oldest  Newest  Rating
+1 Bucky Roberts · August 10, 2014
Yep, the forums syntax highlighter is causing several character encoding issues. 
  • 1

Bug Reports

106,940 followers
About

Found a bug on the site? Report it here. For all security related bugs, please send me a private message.

Links
Moderators
Bucky Roberts Administrator