这个怎么写  谢谢
                    
                    
                5 回答
                        已采纳
                    
                                        
                        
                            田心枫
                            
                                
                            
                        
                        
                                                
                    TA贡献1064条经验 获得超383个赞
function isLeapYear(year) //闰年能被4整除且不能被100整除,或能被400整除。
< script language=’javascript’>
function isLeapYear(year) {  return (year % 4 == 0) && (year % 100 != 0 || year % 400 == 0);  }
< /script>
                            司风0
                            
                        
                                                
                    TA贡献26条经验 获得超15个赞
                                补JAVA(ಡωಡ)hiahiahia 
public int isYer(int year){
   if( year%4 == 0 && year % 100 != 0 || year % 400 == 0 )
        return 1;//闰年
    else 
        return 0;
}
                            
                            
                        
                            慕粉3342523
                            
                                
                            
                        
                        
                                                
                    TA贡献17条经验 获得超5个赞
#include<stdio.h>
int main()
{
int year,result;
scanf("%d",&year);
if( year%4 == 0 && year % 100 != 0 || year % 400 == 0 )
result=1;//闰年也可以写result =29;为2月份天数
else
result=0;
printf("%d",result);
return 0;//非闰年也可以写result =28;为2月份天数
}
//希望采纳
                            田心枫
                            
                                
                            
                        
                        
                                                
                    TA贡献1064条经验 获得超383个赞
#include<stdio.h>
 
int main()
{
    int year,result;
    scanf("%d",&year);
    if( year%4 == 0 && year % 100 != 0 || year % 400 == 0 )
        result=1;
    else 
        result=0;
    printf("%d",result);
    return 0;
}添加回答
举报
0/150
	提交
		取消
	