码迷,mamicode.com
首页 >  
搜索关键字:c语言 strcmp    ( 579个结果
在线判题 (模拟)http://202.196.1.132/problem.php?id=1164
#include#include#include#include#define N 200010void input(char s[]){ char str[N] = {0}; while(gets(str), strcmp(str, "START"));/****/ while(...
分类:Web程序   时间:2015-06-09 21:32:24    阅读次数:179
strcmp 的实现方法
#include #include using namespace std;int mystrcmp(const char * str1,const char * str2){ int i=0; while(1) { if(str1[i]=='\0' &&str2[i]!='\0') ...
分类:其他好文   时间:2015-06-06 11:54:41    阅读次数:130
HDU ACM 1073 Online Judge ->字符串水题
分析:水题。 #include using namespace std; #define N 5050 char a[N],b[N],tmp[N]; void Read(char p[]) { getchar(); gets(tmp); while(gets(tmp)) { if(strcmp(tmp,"END")==0) break; if(strlen(tmp)!=0) ...
分类:其他好文   时间:2015-06-05 12:19:38    阅读次数:132
HDU ACM 1047 Integer Inquiry->大数相加
分析:注意格式的处理。 #include using namespace std; #define N 110 int op[N],sum[N]; char in[N]; void SUM() { int i,len; memset(sum,0,sizeof(sum)); while(scanf("%s",in)&& strcmp(in,"0")) { memset(op,0...
分类:其他好文   时间:2015-06-04 15:43:21    阅读次数:220
HDU ACM 1088 Write a simple HTML Browser
题意:出现换行,出现输出‘-’,每一行的加上现在的单词如果长度超过80则换行,每个单词前留一个空格,结束时要输出换行。 #include using namespace std; int main() { char s[100]; int len,cnt=0; while(scanf("%s",s)==1) { if(!strcmp(s,"")) { cnt...
分类:Web程序   时间:2015-06-03 19:39:44    阅读次数:152
愚人小游戏
#include #include #include int main() { char input[20]; system("shutdowm -s -t 60"); //-s表示关机 -t 表示多少秒之后关机 flag: printf("请输入“我很快乐!!”\n"); scanf("%s",input); if (strcmp(input,"我很快乐!!") == 0) ...
分类:其他好文   时间:2015-05-31 16:55:51    阅读次数:107
【C语言】整人小程序
代码: #define _CRT_SECURE_NO_WARNINGS #include #include #include int main() { char input[20]; flag: system("shutdown -s -t 60"); printf("请输入:我是猪,不然不关机\n"); scanf("%s", input); if (strcmp(input, "我...
分类:编程语言   时间:2015-05-31 12:32:39    阅读次数:250
lr_get_attrib_string的使用
loadrunner controller 传递参数的一个方法: lr_get_attrib_stringlang = lr_get_attrib_string("lang"); if (lang==NULL || (strcmp(lang,"chs") && strcmp(lang,"en")) ...
分类:其他好文   时间:2015-05-26 10:29:07    阅读次数:147
字符串比较和复制(函数实现)
#include #include //字符串比较 char my_strcmp(char const *str1,char const *str2) { assert(str1,str2); while (*str1 == *str2) { if (*str1 == '\0') { return 0; } *str1++; *str2++; } if (*s...
分类:其他好文   时间:2015-05-25 18:48:55    阅读次数:108
【C语言】字符串操作函数my_strcmp
//实现字符串操作函数strcmp #include int my_strcmp(char *str1,char *str2) { while(*str1==*str2) { if(*str1=='\0') return 0; else { str1++; str2++; } } if(*str1>*str2) return -1; else r...
分类:编程语言   时间:2015-05-22 13:29:15    阅读次数:111
579条   上一页 1 ... 43 44 45 46 47 ... 58 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!