79453249

Date: 2025-02-20 03:14:09
Score: 1
Natty:
Report link

The formula I learned in school for random numbers is:

srand(time(0));
// rand() % (max-min+1)+min
int MIN = 0, MAX = 1;
int random = rand() % (MAX-MIN+1)+MIN;

Make sure to include

#include <ctime>
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: GoodDay