Mega Code Archive

 
Categories / C / Code Snippets
 

A random number is chosen between 1 and 100

#include <stdio.h> #include <stdlib.h> int main() { int number = rand() % 100 + 1; printf("%d ",number); }