05 2011 档案

C语言 日历查询系统 成品
摘要:#include<stdio.h> #include<string.h> #include<time.h> //#include<conio.h> #include<stdlib.h> #include<windows.h>int isleapyear(int year) //判断该年是 闰年 还是 平年 { if((year%4==0&&year%100!=0) || (year%400==0) ) //判断该年是 闰年 return 1; else return 0; } int firstdayofy 阅读全文

posted @ 2011-05-17 16:10 spring学习笔记 阅读(259) 评论(0) 推荐(0)

输入验证码进入 万年历系统 1
摘要:#include<stdio.h>#include<string.h>#include<time.h>//#include<conio.h>#include<stdlib.h>void main(){ int i,j,x; char p[20],ch; char temp[20]; for(i=0;i<3;i++) { system("cls"); j=0; srand(time(0)); //随即产生一个数 x=rand()%10000+1000; //产生的是一个大于1000的数 printf(" 阅读全文

posted @ 2011-05-16 17:10 spring学习笔记 阅读(161) 评论(0) 推荐(0)

随机出现 不相等的0--8的数
摘要:int CreatMatrix(int *matrix){ int i,j; int buf; for(i=0;i<9;i++) { getElem: srand((unsigned)time(NULL)); buf=rand()%9; for(j=0;j<i;j++) { if(matrix[j]==buf) goto getElem; } matrix[i]=buf; } return OK;} 阅读全文

posted @ 2011-05-11 15:50 spring学习笔记 阅读(163) 评论(0) 推荐(0)

c语言 万年历!!
摘要:#include "stdio.h"int isleapyear(int year){ if((year%4!=0||year%100==0) && (year%400!=0) ) return 0; else return 1;}int firstdayofyear(int year){ return (year+(year-1)/4+(year-1)/400-(year-1)/100)%7;}main(){ char *monthname[13]={" ","一月份","二月份","三 阅读全文

posted @ 2011-05-04 15:50 spring学习笔记 阅读(232) 评论(0) 推荐(0)