输入返回问题
#include<stdio.h>#include<stdlib.h>
struct
{
int day;
int month;
int year;
}Date;
int main()
{
int days;
printf("请输入年、月、日:");
scanf("%d %d %d",&Date.year,&Date.month,&Date.day);
if(Date.day>31)
{
printf("输入有误,请再次输入:");
scanf("%d %d %d",&Date.year,&Date.month,&Date.day);
}
switch(Date.month)
{
case 1: days=Date.day; break;
case 2: days=Date.day+31; break;
.................................
printf("请输入年、月、日:");
scanf("%d %d %d",&Date.year,&Date.month,&Date.day);
if(Date.day>31)
{
printf("输入有误,请再次输入:");
scanf("%d %d %d",&Date.year,&Date.month,&Date.day);
我想在输错时直接返回第一次输入那 应该怎样写呢?