#include<stdio.h>

main( )

{  int   year , leap;

scanf("%d",&year);             if((year%9==0&&year%100!=0)||(year%400==0))

printf("%d is a leap year.\n",year);

else printf("%d is not a leap year.\n",year);

}

C语言初学 判断闰年的问题的更多相关文章

  1. C 语言实例 - 判断闰年

    用户输入年份,判断该年份是否为闰年. #include <stdio.h> int main() { int year; printf("输入年份: "); scanf ...

  2. Go语言练习---判断闰年以及根据现在的秒数求现在的年月日

    package main import ( "fmt" "math" "time" ) /* @闰年判断 ·封装一个函数判断某一个年份是不是 ...

  3. 判断闰年C语言版

    #include<stdio.h> int isLeap(int year) { // 必须先判断是平年的情况 后判断闰年的情况 == && year%!=) || yea ...

  4. c#判断闰年

    using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.T ...

  5. php判断闰年

    <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title&g ...

  6. java练习题:解一元二次方程、判断闰年、判断标准身材、三个数取最大值

    1.解一元二次方程 注:求根公式为(-b+根号德尔塔)/2a,(-b-根号德尔塔)/2a Scanner sc=new Scanner(System.in); System.out.println(& ...

  7. 判断闰年的方法以及如何获得单链表的倒数第K个元素

    今天很悲催,心中向往的公司,打电话过来面试,问到我两个问题,结果竟然都没有回答上,伤心了,记录下今天失败,希望以后不要被同样的问题给PASS. 问题1.如何判断是否为闰年 所谓闰年那就是:四年一闰,百 ...

  8. c语言 如何判断是不是 可显字符

    c语言 如何判断是不是 可显字符int isprint(int c)若可显示返回1,否则0:要包含头文件ctype.h

  9. OpenJudge 计算概论-判断闰年

    /*======================================================================== 判断闰年 总时间限制: 1000ms 内存限制: ...

随机推荐

  1. MongoDB insert/update/one2many案例

    以博文与评论为例,博文有标题内容,对应多个评论,评论有评论人.评论内容等. ()插入一条博文: db.blog.insert( {','title':'this is blog title1','co ...

  2. 解决TextView与RadioGroup不对齐的问题

    TextView和RadioGroup是在同一个LinearLayout中的,控件摆放方式是android:orientation="horizontal",虽然三个控件是水平摆放 ...

  3. Pig Apache Hadoop

    http://blog.cloudera.com/blog/2009/06/analyzing-apache-logs-with-pig/

  4. VCRedist.exe静默安装方法(转)

    INNO setup 制作安装包  的时候,发布VC++运行时 [Run]Filename: {app}vcredist_x86.exe; Parameters: /q; WorkingDir: {t ...

  5. 如何获取一个AlertDialog中的EditText中输入的内容

    怎么获取一个AlertDialog中的EditText中输入的内容? new AlertDialog.Builder(this)   .setTitle("请输入")   .set ...

  6. virtualbox端口转发

    端口转发:setting->network->adapter:attached to NAT.port forwarding rules->name    protocol     ...

  7. tarjan缩点

    整理了下模板... #include<iostream> #include<cstdio> #include<cmath> #include<algorith ...

  8. 王学长的AAA树

    让我们响应王学长的号召勇敢的分开写splay和lct吧! 分开写大法好!!!!!!!!!!!杜教的ch[4]弱爆了!!!! #include <stdio.h> #include < ...

  9. LINQPad 调试

    var ss=from o in Orders from od in OrderDetails.Where(od=>od.OrderId == od.OrderId) from c in Cou ...

  10. AES的S-BOX构造优化

    之前写过SBOX的构造,后来看到别人的优秀思路,借鉴过来重新改了一点. 原文地址:http://www.cnblogs.com/7hat/p/3383546.html 主要是将矩阵运算改为列运算之和, ...