Number Guessing Game
public c v1 · immutable#include <stdio.h>#include <time.h>#include <stdlib.h>int main(void) { int mine = 0; int yours = 0; srand(time(NULL)); mine = 1 + rand() % 100; printf("Guess my number, 1 - 100: "); scanf("%d", &yours); if(yours < mine) printf("Your guess was too low\n"); else if(yours > mine) printf("Your guess was too high\n"); else printf("Correct!\n"); printf("The correct number was, %d\n", mine); return 0;}