havent touched c for a while long time, not sur its currect or not
3.(使用無窮迴圈)輸入任意年份,判斷是否為閏年,若輸入0則結束
main()
{
ini i;
for(,,)
{
printf("Please enter the year");
scanf("%d",&i);
if(i==0)
{
break
}
elseif(i%4==0)
{
printf("是閏年\n");
}
else
{
printf("not閏年\n");
}
}
}
|