#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. windows 2003 远程桌面 连接输入账号密码后,只能看见蓝色屏幕和鼠标

    具体解决方案参考的 http://www.tomshardware.com/forum/171045-46-remote-desktop-connection-blank-desktop   to s ...

  2. python的工作记录A

    马上进入工作自动化: [root@localhost ~]# cat svn_bbs.py import os,sys,commands,subprocess import re,time svnUr ...

  3. Linux 安装字体

    把XP下的字体C:\WINDOWS\FONTS\simsun.ttc(也就是宋体,大小为10M),把他重命名为 simsun.ttf 拷贝simsun.ttf 字体到 /usr/share/fonts ...

  4. AC自动机修正

    #include<iostream> #include<cstdio> #include<cmath> #include<algorithm> #inc ...

  5. IIS 403.14 - Forbidden错误解决方法

    HTTP 错误 403.14 - ForbiddenWeb 服务器被配置为不列出此目录的内容. 解决方法如下: 打开IIS的”处理程序映射设置“,在右边的操作栏下有 ”添加脚本映射“请求路径:*可执行 ...

  6. bzoj4096 [Usaco2013 dec]Milk Scheduling

    Description Farmer John has N cows that need to be milked (1 <= N <= 10,000), each of which ta ...

  7. css实现居中的各种方法

    css垂直居中有很多种方法,可以参考下这个网站

  8. eclipse 解决插件失效

    昨天系统崩溃,重装系统后eclipse突然对links方式加载插件失效.用尽了网上各种解决方法,始终不行.在%eclispe_dir%/configration/org.eclipse.update/ ...

  9. flume的自定义sink-Kafka

    1.创建一个agent,sink类型需指定为自定义sink        vi /usr/local/flume/conf/agent3.conf        agent3.sources=as1  ...

  10. Filebeat中文指南

    Filebeat中文指南 翻译自:https://www.elastic.co/guide/en/beats/filebeat/current/index.html 译者:kerwin 鸣谢:tory ...