以下是我正在工作的代码片段,虽然我的输入需要 4 个值,但在用户输入正确的值之前,它应该不断询问,任何输入都相同提前谢谢
#include<stdio.h>
#include<math.h>
int
main(int argc, char *argv[])
{
int days;
float peny;
do{
printf("Enter Number of days: ");
scanf("%d", &days);
}
while ((days != 28) || (days != 29) ||(days != 30) ||(days != 31));
printf("Number of days are %d", days);
}