| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 975 人关注过本帖
标题:test
只看楼主 加入收藏
wp231957
Rank: 20Rank: 20Rank: 20Rank: 20Rank: 20
来 自:神界
等 级:贵宾
威 望:423
帖 子:13688
专家分:53332
注 册:2012-10-18
结帖率:99.76%
收藏
已结贴  问题点数:20 回复次数:2 
test
#include<stdio.h>
#include<string.h>


//返回目标月份在12标准月中的索引值
int nindex(char * destmonth)
{
    int s=99;
    char * months[12] =
    {
        "January","February","March","April","May","June",
        "July","August","September","October","November","December"
    };
    for(int i=0;i<12;i++)
    {
        if(strcmp(months[i],destmonth)==0)
        {
            s=i;
            break;
        }
    }
    return s;
}

int  main()
{
    char * months[12] =
    {
        "January","February","March","April","May","June",
        "July","August","September","October","November","December"
    };
    char * mp[10] =
    {
        "January 01 01","January 01 00","February 28 99","July 17 12","September 10 12",
        "July 01 00","June 30 90","August 25 06","May 27 08","October 01 03"
    };
    int i,j;
    for(i=0;i<12;i++)
    {
        for(j=0;j<10;j++)
        {
            if(strcmp(months[i],mp[j])==0) printf("%s\n",mp[j]);
        }
    }
    return 0;
}
2017-03-13 10:12
tlliqi
Rank: 19Rank: 19Rank: 19Rank: 19Rank: 19Rank: 19
等 级:贵宾
威 望:204
帖 子:15453
专家分:65956
注 册:2006-4-27
收藏
得分:20 
有空帮你
2017-03-13 11:34
wp231957
Rank: 20Rank: 20Rank: 20Rank: 20Rank: 20
来 自:神界
等 级:贵宾
威 望:423
帖 子:13688
专家分:53332
注 册:2012-10-18
收藏
得分:0 
以下是引用tlliqi在2017-3-13 11:34:44的发言:

有空帮你
没事,我只是在单位和家之间建立一条代码复制通道  请问 还有什么高招

DO IT YOURSELF !
2017-03-13 15:42
快速回复:test
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.016722 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved