/* Program rand1.c This program demonstrates the use of the rand() function */ #include main() { int target; int guess; int again; printf("\n Do you want to guess a number 1 =Yes, 0=No "); scanf("%d",&again); while (again) { target = rand() % 100; guess = target + l; while(target!=guess) { printf('\n What is your guess ? "); scanf("%d",&guess); if (target>guess) printf("Too low"); else printf("Too high"); } printf("\n Well done you got it! \n"); printf("\n Do you want to guess a number 1=Yes, 0=No"); scanf("%d".&again); } }