#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
#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
分析:水题。
#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
分析:注意格式的处理。
#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
题意:出现换行,出现输出‘-’,每一行的加上现在的单词如果长度超过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
代码:
#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
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
//实现字符串操作函数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