立即注册 登录
欧卡2中文社区 返回首页

起名字最烦了的个人空间 https://www.tecbbs.com/?39 [收藏] [复制] [分享] [RSS]

日志

代码转html工具:ToHtm1.0.2

已有 1739 次阅读2012-9-4 23:45 |个人分类:学习| 修正, 下载地址

ToHtm1.0.2 (2011-08-17)
========================================================================================================================
增加:
+ 初步添加语法高亮

修正:
* 显示细节修正

语法高亮只做到部分支持,而且有很多错误,打开某些文件时可能会

出现死循环的问题,不知道是什么原因造成的

下载地址

查看其他

 

 

显示效果示例:

 

Powered by ToHtm 1.0.2


  1.   2.   3.   4.   5.   6.   7.   8.   9.   10.   11.   12.   13.   14.   15.   16.   17.   18.   19.   20.   21.   22.   23.   24.   25.   26.   27.   28.   29.   30.   31.   32.   33.   34.   35.   36.   37.   38.   39.   40.   41.   42.   43.   44.   45.   46.   47.   48.   49.   50.   51.   52.   53.   54.   55.   56.   57.   58.   59.   60.   61.   62.   63.   64.   65.   66.   67.   68.   69.   70.   71.   72.   73.   74.   75.   76.   77.   78.   79.   80.   81.   82.   83.   84.   85.   86.   87.   88.   89.   90.   91.   92.   93.   94.   95.   96.   97.   98. #include<iostream> using namespace std; struct day {    int year;    int month;    int days;    int caculate()    {        int m=0;        if(year%4==0&&(year%100!=0||year%400==0)&&month>2)            m=m+1;        switch (month)        {               case 12:m=m+30;               case 11:m=m+31;               case 10:m=m+30;               case 9:m=m+31;               case 8:m=m+31;               case 7:m=m+30;               case 6:m=m+31;               case 5:m=m+30;               case 4:m=m+31;               case 3:m=m+28;               case 2:m=m+31;               case 1:m=m+0;        }        m=m+days;        return m;              }    int judge(int year,int month,int days)    {       switch (month)       {         case 1:         case 3:         case 5:         case 7:         case 8:         case 10:         case 12:             if(days<1||days>31)             {                 return 0;                 break;             }         case 4:         case 6:         case 9:         case 11:             if(days<1||days>30)             {                return 0;                break;             }         case 2:             if(year%4==0&&(year%100!=0||year%400==0))                if(days<1||days>29)                {                  return 0;                  break;                }                else                    ;              else if(days<1||days>28)              {                  return 0;                  break;              }                       }    } }; int main() {   day one;   cout<<"please enter:year month days"<<endl;   cin>>one.year>>one.month>>one.days;   while(one.year)   {   while(one.judge(one.year,one.month,one.days)==0)   {       cout<<"输入有误,请重新输入:(年份为0时结束)"<<endl;       cout<<"please enter:year month days"<<endl;       cin>>one.year>>one.month>>one.days;   }   if(one.year)   cout<<"这是这年的第"<<one.caculate()<<"天"<<endl;   } /* while(judge(one.year,one.month,one.days))   {     cout<<"这是这年的第"<<ONE.CACULATE()<<"天"<>one.year>>one.month>>one.days;     }*/</ONE.CACULATE()<<"天"<   return 0; }

ToHtm
Aug.17,2011



路过

鸡蛋

鲜花

握手

雷人

评论 (0 个评论)

facelist

您需要登录后才可以评论 登录 | 立即注册

联系我们|手机版|欧卡2中国 ( 湘ICP备11020288号-1 )

GMT+8, 2024-5-19 08:27 , Processed in 0.083042 second(s), 6 queries , Redis On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

返回顶部