物联网学习教程——程序举例

例: 写程序,判断某一年是否闰年。算法 用下图来表示判断闰年的算法。工具 #include <stdio.h> void main() {int year, leap;  scanf("%d",&year);  if (year%4==0) {if (year%100==0)     {if (year%400==0)  leap=1;       else leap=0;}   else  le
相关文章
相关标签/搜索