您当前的位置:首页 > 生活 > 内容

QQ空间留言代码怎么弄?C语言的简单日历代码,求大神帮忙!!

免费天气预报代码生成器哪里有七种免费天气预报代码 《iframe width=“150“ height=“240“ frameborder=“0“ scrolling=“No“ src=’求采纳如何实现网站禁止右键功能您好把下列代码放到《body》《/body》或者《head》《/head》之间一、禁止点鼠标右键1.《script LANGUAGE=“JavaScript“》 function click() { if (event.button==2) {alert(’你好,右键已被禁止使用’); } } document.onmousedown=click《/script》二、禁止点击鼠标右键2:《SCRIPT language=JavaScript》《!--file://锁鼠标右键和键盘CONTEXTMENU键function click(e) {if (document.all) {if (event.button==2||event.button==3) { alert(“欢迎光临知心朋友,“);oncontextmenu=’return false’;}}if (document.layers) {if (e.which == 3) {oncontextmenu=’return false’;}}}if (document.layers) {document.captureEvents(Event.MOUSEDOWN);}document.onmousedown=click;document.oncontextmenu = new Function(“return false;“)// --》《/SCRIPT》三、禁止点击鼠标右键3《!--将以下代码加入HTML的《HEAD》《/HEAD》之间--》《script language=“javascript“》function click() {if (event.button==2) { alert(’欢迎光临知心朋友,离不开了就不要离开了[/ft][/M]将上面的qq空间留言代码拷贝到留言板上即可,这样就在去查看qq空间留言板上就可以直接去预览效果,#include《stdio.h》#include 《string.h》#include 《time.h》#include 《math.h》#include 《windows.h》int year , month , day ;int day_of_month = {31,28,31,30,31,30,31,31,30,31,30,31};//char wek={’周日’,’周一’,’周二’,’周三’,’周四’,’周五’,’周六’};int current_year,current_month,current_day;/************************************通用关键函数**************************************************/void cls_screen(){ printf(“请按任意键返回!\n“); getchar(); getchar(); system(“cls“);}void get_current_time() //获取当前时间{ time_t timep; struct tm *p; time(&timep); p = gmtime(&timep); current_year=1900+p-》tm_year; current_month=1+p-》tm_mon; current_day=p-》tm_mday;}int judgement (int y){ if (y % 400 == 0 || (y % 100 !=0 && y %4 ==0)) return 1 ; else return 0 ;}int show_week (int year , int month , int day){/*公式:w=(y+[y/4]+[c/4]-2c+[26(m+1)/10]+d-1)%7 */ int w ,k; //记录周几 int year_last=year %100,c=year/100 , m = month; if (month==1 ) { year_last-=1 ; m=13 ; } else if (month==2) { year_last-=1; m=14; } w = (year_last + year_last/4 + c/4 - 2*c +26*(m+1)/10+day-1); // abs 绝对值 if (w《0) { k=(w%7+7)%7; } else k=w%7; return k ;}/************************************第一部分**************************************************/void print_year (int year){ int i , k ,x ,first_week; printf (“请输入想要查询的年月(格式如2012):“); scanf (“%d“,&year); printf(“=======================%d年===========================\n“,year); printf(“\n“); if (judgement(year)) { day_of_month=29; } else day_of_month=28; for (i=1 ; i 《13 ; i++) { first_week = show_week(year,i,1); printf(“=====================%d月日历如下========================\n“,i); printf (“Sun\tMon\tTue\tWed\tThu\tFri\tSat\n“); for (x=1;x《=first_week;x++) { printf(“\t“); if (x%7==0) printf (“\n“); } for (k=1;k《=day_of_month[i-1];k++) { printf(“%d\t“,k); if (x%7==0) printf (“\n“); x++; } printf(“\n“); printf(“\n“); printf(“\n“); }}/************************************第二部分**************************************************/void print_year_month (){ int k ,x ,first_week; printf (“请输入想要查询的年月(格式如2012 12):“); do { scanf (“%d %d“,&year,&month); if (month《1||month》12) { printf(“您输入的月份有误哦~请输入正确的月份\n“); printf (“请输入想要查询的年月(格式如2012 12):“); } }while(1》month||month》12); printf(“=====================%d年%d月======================\n“,year,month); if (judgement(year)) { day_of_month=29; } else day_of_month=28; first_week = show_week(year,month,1); printf (“Sun\tMon\tTue\tWed\tThu\tFri\tSat\n“); for (x=1;x《=first_week;x++) { printf(“\t“); if (x%7==0) printf (“\n“); } for (k=1;k《=day_of_month[month-1];k++) { printf(“%d\t“,k); if (x%7==0) printf (“\n“); x++; } printf(“\n“);}/************************************第三部分**************************************************/int year_before_sumdays (int year,int month, int day){ int days=0 ,i,judgement1; int temp_day=0 ,sum_days; // //printf (“%d,%d\n“,current_year,current_month); judgement1=judgement(year); /*===================比当前少=====================*/ if (year 《 current_year ) { for (i = year+1;i 《 current_year ;i++) { if (judgement(i)) { days=days+356; } else days+=355; } for (i = month+1;i《=12;i++) { days=days+day_of_month[i-1]; } days = days + day_of_month[month-1]-day; //指定日子距离当年结束还有多少天 //printf(“去年还有%d\n“,days); for (i = 0;i 《 current_month-1;i++ ) { if (judgement1) { day_of_month=29; } temp_day = temp_day + day_of_month[i]; } //当前日子是这一年的多少天 temp_day = temp_day + current_day; //printf(“今天是第%d天\n“,temp_day); sum_days=temp_day + days ; } /*===================比当前多=====================*/ if (year 》 current_year ) { for (i =current_year+1;i 《 current_year ;i++) { if (judgement(i)) { days=days+356; } else days+=355; } for (i = current_month+1;i《=12;i++) { days=days+day_of_month[i-1]; } days = days + day_of_month[month-1]-current_day; //指定日子距离当年结束还有多少天 //printf(“去年还有%d\n“,days); for (i = 0;i 《month-1;i++ ) { if (judgement1) { day_of_month=29; } temp_day = temp_day + day_of_month[i]; } //当前日子是这一年的多少天 temp_day = temp_day + day; //printf(“今天是第%d天\n“,temp_day); sum_days=temp_day + days ; } /*===================比当前一样=====================*/ if (year == current_year ) { if(month 《current_month) { for (i=month+1;i《current_month;i++) { if (judgement1) { day_of_month=29; } days = days + day_of_month[i]; } sum_days = days + current_day + day_of_month[month-1] - day ; } if (month》current_month) { for (i=current_month+1;i《month;i++) { if (judgement1) { day_of_month=29; } days = days + day_of_month[i]; } sum_days = days + day + day_of_month[month-1] - current_day ; printf(“%d\n“,days); } if (month==current_month) { sum_days= abs(day-current_day); } } return sum_days ;}void print(int year,int month,int day){ int week; printf (“请输入想要查询的年月(格式如2012 12 12 ):“); do { scanf (“%d %d %d“,&year,&month,&day); if (judgement(year)) { day_of_month=29; } printf(“\n“); if (day《=0 || day 》day_of_month[month-1]) printf (“%d月没有%d,请重新输入(格式如2012 12 12 ):“,month,day); }while(day《=0 || day 》day_of_month[month-1]); week=show_week (year,month ,day); printf(“\n“); switch(month)//判断查找天是否阳历节日先由月份判断是否有节日的月份再由日判断是否为节日 { case 1:switch(day) { case 1:printf(“元旦“) ;break; default:printf(“不是阳历节日“); }break; case 2:switch(day) { case 14:printf(“情人节(Valentines Day)“);break; default:printf(“不是阳历节日“); }break; case 3:switch(day) { case 8:printf(“妇女节¨(Women’s Day)“);break; case 12:printf(“植树节(Arbor Day)“);break; default:printf(“不是阳历节日“); }break; case 4:switch(day) { case 1:printf(“愚人节(April Fools Day)“);break; case 5:printf(“清明节(Tomb-sweeping Day)“);break; default:printf(“不是阳历节日“); }break; case 5:switch(day) { case 1:printf(“劳动节(Labor Day)“);break; case 4:printf(“中国青年节(Chinese Youth Day)“); default:printf(“不是阳历节日“); }break; case 6:switch(day) { case 1:printf(“儿童节(Children’s Day)“);break; default:printf(“不是阳历节日“); }break; case 8:switch(day) { case 1:printf(“建军节(the Army’s Day)“);break; default:printf(“不是阳历节日“); }break; case 9:switch(day) { case 10:printf(“教师节(Teacher’s Day)“);break; default:printf(“不是阳历节日“); }break; case 10:switch(day) { case 1:printf(“国庆节(National Day)“);break; case 31:printf(“万圣节(Helloween Day)“);break; default:printf(“不是阳历节日“); }break; case 12:switch(day) { case 25 :printf(“圣诞节(Christmas Day)“);break; default:printf(“不是阳历节日“); }break; } printf(“\n“); printf(“%d年%d月%d号是:“,year,month,day); switch(week)//判断所查找天是星期几 { case 0:printf(“Sunday“);break; case 1:printf(“Monday“);break; case 2:printf(“Tuesday“);break; case 3:printf(“Wednesday“);;break; case 4:printf(“Thursday“);break; case 5:printf(“Friday“);break; case 6:printf(“Saturday“);break; } printf(“\n“); printf(“距离今天有%d天\n“,year_before_sumdays ( year, month, day)); printf(“\n“);}/********************************************************************************************/void main (){ int choice,year,month,day,flag=1; char c , k; for(;1;)//显示程序菜单,QQ空间留言代码怎么弄留言代码用法:在网上找到了qq空间留言代码之后,谢谢您的合作,谢谢您的合作。

QQ空间留言代码怎么弄

留言代码用法:

  • 在网上找到了qq空间留言代码之后,

  • 然后将代码复制粘贴到留言板上,这样就在去查看qq空间留言板上就可以直接去预览效果。

  • 在这里推荐一个代码:

    [M][ftc=#EBDCEB][ftf=Webdings]Y[/ft][/ft]     [ftc=#F49BC1][ftf=Webdings]Y[/ft][/ft][ftc=#EBDCEB][ftf=Webdings]Y[/ft][/ft]      [ftc=#EBDCEB][ftf=Webdings]Y[/ft][/ft] [ftc=#F49BC1][ftf=Webdings]Y[/ft][/ft]     [ftc=#EBDCEB][ftf=Webdings]Y[/ft][/ft][ftc=#F49BC1][ftf=Webdings]Y[/ft][/ft]    [ftc=#8293CA][fts=5][ftf=Webdings]Y[/ft][/ft][/ft]

    [ftc=#8293CA]可不可以,离不开了就不要离开了[/ft][/M]

  • 将上面的qq空间留言代码拷贝到留言板上即可。

    最终代码显示的效果图:

  • C语言的简单日历代码,求大神帮忙!!

    #include《stdio.h》#include 《string.h》#include 《time.h》#include 《math.h》#include 《windows.h》int year , month , day ;int day_of_month = {31,28,31,30,31,30,31,31,30,31,30,31};//char wek={’周日’,’周一’,’周二’,’周三’,’周四’,’周五’,’周六’};int current_year,current_month,current_day;/************************************通用关键函数**************************************************/void cls_screen(){ printf(“请按任意键返回!\n“); getchar(); getchar(); system(“cls“);}void get_current_time() //获取当前时间{ time_t timep; struct tm *p; time(&timep); p = gmtime(&timep); current_year=1900+p-》tm_year; current_month=1+p-》tm_mon; current_day=p-》tm_mday;}int judgement (int y){ if (y % 400 == 0 || (y % 100 !=0 && y %4 ==0)) return 1 ; else return 0 ;}int show_week (int year , int month , int day){/*公式:w=(y+[y/4]+[c/4]-2c+[26(m+1)/10]+d-1)%7 */ int w ,k; //记录周几 int year_last=year %100,c=year/100 , m = month; if (month==1 ) { year_last-=1 ; m=13 ; } else if (month==2) { year_last-=1; m=14; } w = (year_last + year_last/4 + c/4 - 2*c +26*(m+1)/10+day-1); // abs 绝对值 if (w《0) { k=(w%7+7)%7; } else k=w%7; return k ;}/************************************第一部分**************************************************/void print_year (int year){ int i , k ,x ,first_week; printf (“请输入想要查询的年月(格式如2012):“); scanf (“%d“,&year); printf(“=======================%d年===========================\n“,year); printf(“\n“); if (judgement(year)) { day_of_month=29; } else day_of_month=28; for (i=1 ; i 《13 ; i++) { first_week = show_week(year,i,1); printf(“=====================%d月日历如下========================\n“,i); printf (“Sun\tMon\tTue\tWed\tThu\tFri\tSat\n“); for (x=1;x《=first_week;x++) { printf(“\t“); if (x%7==0) printf (“\n“); } for (k=1;k《=day_of_month[i-1];k++) { printf(“%d\t“,k); if (x%7==0) printf (“\n“); x++; } printf(“\n“); printf(“\n“); printf(“\n“); }}/************************************第二部分**************************************************/void print_year_month (){ int k ,x ,first_week; printf (“请输入想要查询的年月(格式如2012 12):“); do { scanf (“%d %d“,&year,&month); if (month《1||month》12) { printf(“您输入的月份有误哦~请输入正确的月份\n“); printf (“请输入想要查询的年月(格式如2012 12):“); } }while(1》month||month》12); printf(“=====================%d年%d月======================\n“,year,month); if (judgement(year)) { day_of_month=29; } else day_of_month=28; first_week = show_week(year,month,1); printf (“Sun\tMon\tTue\tWed\tThu\tFri\tSat\n“); for (x=1;x《=first_week;x++) { printf(“\t“); if (x%7==0) printf (“\n“); } for (k=1;k《=day_of_month[month-1];k++) { printf(“%d\t“,k); if (x%7==0) printf (“\n“); x++; } printf(“\n“);}/************************************第三部分**************************************************/int year_before_sumdays (int year,int month, int day){ int days=0 ,i,judgement1; int temp_day=0 ,sum_days; // //printf (“%d,%d\n“,current_year,current_month); judgement1=judgement(year); /*===================比当前少=====================*/ if (year 《 current_year ) { for (i = year+1;i 《 current_year ;i++) { if (judgement(i)) { days=days+356; } else days+=355; } for (i = month+1;i《=12;i++) { days=days+day_of_month[i-1]; } days = days + day_of_month[month-1]-day; //指定日子距离当年结束还有多少天 //printf(“去年还有%d\n“,days); for (i = 0;i 《 current_month-1;i++ ) { if (judgement1) { day_of_month=29; } temp_day = temp_day + day_of_month[i]; } //当前日子是这一年的多少天 temp_day = temp_day + current_day; //printf(“今天是第%d天\n“,temp_day); sum_days=temp_day + days ; } /*===================比当前多=====================*/ if (year 》 current_year ) { for (i =current_year+1;i 《 current_year ;i++) { if (judgement(i)) { days=days+356; } else days+=355; } for (i = current_month+1;i《=12;i++) { days=days+day_of_month[i-1]; } days = days + day_of_month[month-1]-current_day; //指定日子距离当年结束还有多少天 //printf(“去年还有%d\n“,days); for (i = 0;i 《month-1;i++ ) { if (judgement1) { day_of_month=29; } temp_day = temp_day + day_of_month[i]; } //当前日子是这一年的多少天 temp_day = temp_day + day; //printf(“今天是第%d天\n“,temp_day); sum_days=temp_day + days ; } /*===================比当前一样=====================*/ if (year == current_year ) { if(month 《current_month) { for (i=month+1;i《current_month;i++) { if (judgement1) { day_of_month=29; } days = days + day_of_month[i]; } sum_days = days + current_day + day_of_month[month-1] - day ; } if (month》current_month) { for (i=current_month+1;i《month;i++) { if (judgement1) { day_of_month=29; } days = days + day_of_month[i]; } sum_days = days + day + day_of_month[month-1] - current_day ; printf(“%d\n“,days); } if (month==current_month) { sum_days= abs(day-current_day); } } return sum_days ;}void print(int year,int month,int day){ int week; printf (“请输入想要查询的年月(格式如2012 12 12 ):“); do { scanf (“%d %d %d“,&year,&month,&day); if (judgement(year)) { day_of_month=29; } printf(“\n“); if (day《=0 || day 》day_of_month[month-1]) printf (“%d月没有%d,请重新输入(格式如2012 12 12 ):“,month,day); }while(day《=0 || day 》day_of_month[month-1]); week=show_week (year,month ,day); printf(“\n“); switch(month)//判断查找天是否阳历节日先由月份判断是否有节日的月份再由日判断是否为节日 { case 1:switch(day) { case 1:printf(“元旦“) ;break; default:printf(“不是阳历节日“); }break; case 2:switch(day) { case 14:printf(“情人节(Valentines Day)“);break; default:printf(“不是阳历节日“); }break; case 3:switch(day) { case 8:printf(“妇女节¨(Women’s Day)“);break; case 12:printf(“植树节(Arbor Day)“);break; default:printf(“不是阳历节日“); }break; case 4:switch(day) { case 1:printf(“愚人节(April Fools Day)“);break; case 5:printf(“清明节(Tomb-sweeping Day)“);break; default:printf(“不是阳历节日“); }break; case 5:switch(day) { case 1:printf(“劳动节(Labor Day)“);break; case 4:printf(“中国青年节(Chinese Youth Day)“); default:printf(“不是阳历节日“); }break; case 6:switch(day) { case 1:printf(“儿童节(Children’s Day)“);break; default:printf(“不是阳历节日“); }break; case 8:switch(day) { case 1:printf(“建军节(the Army’s Day)“);break; default:printf(“不是阳历节日“); }break; case 9:switch(day) { case 10:printf(“教师节(Teacher’s Day)“);break; default:printf(“不是阳历节日“); }break; case 10:switch(day) { case 1:printf(“国庆节(National Day)“);break; case 31:printf(“万圣节(Helloween Day)“);break; default:printf(“不是阳历节日“); }break; case 12:switch(day) { case 25 :printf(“圣诞节(Christmas Day)“);break; default:printf(“不是阳历节日“); }break; } printf(“\n“); printf(“%d年%d月%d号是:“,year,month,day); switch(week)//判断所查找天是星期几 { case 0:printf(“Sunday“);break; case 1:printf(“Monday“);break; case 2:printf(“Tuesday“);break; case 3:printf(“Wednesday“);;break; case 4:printf(“Thursday“);break; case 5:printf(“Friday“);break; case 6:printf(“Saturday“);break; } printf(“\n“); printf(“距离今天有%d天\n“,year_before_sumdays ( year, month, day)); printf(“\n“);}/********************************************************************************************/void main (){ int choice,year,month,day,flag=1; char c , k; for(;1;)//显示程序菜单,为永真,每次查找完回到程序菜单ì { printf(“===================================菜单选项===================================\n“); printf(“请选择:\n“); printf(“* * * * * * * * 1.查找某一年的年历 * * * * * * * *\n“); printf(“* * * * * * * * 2.查找某一月的月历 * * * * * * * *\n“); printf(“* * * * * * * * 3.查找某一天 * * * * * * * *\n“); printf(“* * * * * * * * 0.退出 * * * * * * * *\n“); printf(“=========================================================

    免费天气代码,免费天气预报代码生成器哪里有

    七种免费天气预报代码 《iframe width=“150“ height=“240“ frameborder=“0“ scrolling=“No“ src=’求采纳

    如何实现网站禁止右键功能

    您好把下列代码放到《body》《/body》或者《head》《/head》之间一、禁止点鼠标右键1.《script LANGUAGE=“JavaScript“》 function click() { if (event.button==2) {alert(’你好,右键已被禁止使用’); } } document.onmousedown=click《/script》二、禁止点击鼠标右键2:《SCRIPT language=JavaScript》《!--file://锁鼠标右键和键盘CONTEXTMENU键function click(e) {if (document.all) {if (event.button==2||event.button==3) { alert(“欢迎光临知心朋友,有什么需要帮忙的话,请与站长联系!谢谢您的合作!!!“);oncontextmenu=’return false’;}}if (document.layers) {if (e.which == 3) {oncontextmenu=’return false’;}}}if (document.layers) {document.captureEvents(Event.MOUSEDOWN);}document.onmousedown=click;document.oncontextmenu = new Function(“return false;“)// --》《/SCRIPT》三、禁止点击鼠标右键3《!--将以下代码加入HTML的《HEAD》《/HEAD》之间--》《script language=“javascript“》function click() {if (event.button==2) { alert(’欢迎光临知心朋友,有什么需要帮忙的话,请与站长联系!谢谢您的合作!!!’) }}document.onmousedown=click《/script》


    声明:本文版权归原作者所有,转载文章仅为传播更多信息之目的,如作者信息标记有误,请第一时间联系我们修改或删除,谢谢。

    上一篇: 西红柿的英文(西红柿门)

    下一篇: windowsxp经典主题(求 windows xp 原版主题 !)



    猜你感兴趣

    推荐阅读

    网站内容来自网络,如有侵权请联系我们,立即删除! | 软文发布 | 粤ICP备2021106084号