#include <stdio.h>
#include <stdlib.h>
#include <time.h>

int main(){

	srand(time(NULL)); //generate seed
	int min_rand,max_rand,user_guess,rand_value; //making all the integers
	printf("what is min you want for random?\n"); //question
	scanf("%d", &min_rand); //take answer
	printf("hmmm , what is max you want for random?\n"); //question
	scanf("%d", &max_rand); //take answer
	rand_value= rand() % (max_rand - min_rand + 1) + min_rand; //calculation
	printf("guess value , pretend that i never gave it to you %d \n", rand_value); // a cheat for me
	do{
	printf("lets play a game , guess the number , what is your guess? \n");
	scanf("%d",&user_guess);

	if (rand_value == user_guess) {
	printf("amazing\n");
	}
	
	else if (rand_value > user_guess) {
	
	printf ("nice try but your guess is smaller than actual value try again! \n");
	}
	
	else if (rand_value < user_guess) {
	printf("nice try but your guess is bigger than actual value try again! \n");
	
	}

	} while (rand_value != user_guess);

	return 0;
}
