2012年5月22日
摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2024。C语言标记符:1、首字母以__(下划线)开头或者字母开头,不能用数字。 2、中间的可以为数字,字母或者__(下划线)小技巧:#include<ctype.h>的应用。。isalpha(sz1[i])若是字母则返回非零值,否则返回零。isdigit(sz1[i])和isspace(sz1[i])依次类推。CODE:1#include<stdio.h>2#include<stdlib.h>3#include<string.h>4#include&l 阅读全文
posted @ 2012-05-22 21:35 有间博客 阅读(217) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2040。水题。CODE:1#include<stdio.h>2#include<stdlib.h>3#include<string.h>4#include<math.h>5usingnamespacestd;67constintmaxn=102;89intsave[maxn]={0};1011voidinit()12{13intcnt=1;14for(inti=1;i<=100;i++)15{16save[cnt++]=i*2;17}18retu 阅读全文
posted @ 2012-05-22 20:17 有间博客 阅读(591) 评论(0) 推荐(0) 编辑