C语言编程,猜用户名输入的数字是否正确,直到才对,循环在结束
来源:百度知道 编辑:UC知道 时间:2024/05/21 21:38:45
#include<stdio.h>
void main()
{
int test = 3;
int value;
printf("Please input:");
scanf("%d",&value);
while(value != test)
{
printf("Sorry,you are worng!Continue guess:");
scanf("%d",&value);
}
printf("You are right!Great!\n");
}