1  Binary search / Half find

int main()
{
int i =0;
//     Assume the password is "123456"
for (i = 0; i < 3; i++)
{
{
break;
}
else
{
}

}
if (i == 3)
{
printf(" Roll out procedure \n");

}
return 0;
}

3 Figure guessing game

#include<stdio.h>
#include<stdlib.h>
#include<time.h>
{
printf("*****************************\n");
printf("**********  1.play  *********\n");
printf("**********  0.exit  *********\n");
printf("*****************************\n");
}
void game()
{
int guess = 0;
// Guess the process of the number game
// Generate random number
int r = rand() % 100 + 1;
while (1)
{// Guess the number
printf(" Guess the number ：>");
scanf_s("%d", &guess);
if (guess < r)
{
printf(" Guess it's too small \n");
}
else if (guess > r)
{
printf(" Guess big \n");
}
else
{
printf(" Congratulations , You guessed right \n");
break;
}
}
}

int main()
{
int input = 0;
srand((unsinged int)time(NULL));
do
{

scanf_s("%d", &input);
switch (input)
{
case 1:
printf(" Guess the number \n");
break;
case 0:
printf(" Exit the game \n");
break;
default:
printf(" Selection error \n");
break;
}
} while (input);

return 0;
}

Technology
Daily Recommendation