<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>hbccc的博客</title>
    <link>https://blog.bccn.net/hbccc</link>
    <description>hbccc的博客 的最新20篇文章</description>
    <copyright>Copyright(C) BCCN.NET</copyright>
    <lastBuildDate>2020-12-31 22:11:20 +0800</lastBuildDate>
    <item>
      <title>C语言的文件作用域？</title>
      <link>https://blog.bccn.net/hbccc/67444</link>
      <description>C语言的文件作用域是作用于一个文件还是多个文件？</description>
      <category>C</category>
      <author>hbccc</author>
      <pubDate>2020-12-31 22:11:20 +0800</pubDate>
    </item>
    <item>
      <title>C PRIMER PLUS 第六版 P372 第15题</title>
      <link>https://blog.bccn.net/hbccc/67425</link>
      <description>15.使用字符分类函数实现atoi()函数。 如果输入的字符串不是纯数字，该函数返回0。

#include&amp;lt;stdio.h&amp;gt;


int catoi(char*);


int main(void)
{
 char ch[100];
 int tot;
 
 printf("please input:");
 gets(ch);
 tot=catoi(ch);
 printf("the number:%d",tot);
 return 0;
} 
 
 
int catoi(char*s)
{
 int i=0;
 int s...</description>
      <category>默认分类</category>
      <author>hbccc</author>
      <pubDate>2020-12-14 21:27:13 +0800</pubDate>
    </item>
    <item>
      <title>CPRIMERPLUS 6 P372 第十三题</title>
      <link>https://blog.bccn.net/hbccc/67424</link>
      <description>13.编写一个程序， 反序显示命令行参数的单词。 例如， 命令行参数是see you later， 该程序应打印later you see

#include&amp;lt;stdio.h&amp;gt;
#include&amp;lt;string.h&amp;gt;
#include&amp;lt;ctype.h&amp;gt;


void st(char**,int);


int main(int argc,char *argv[])
{
 //printf("%d\n",argc);
 for(int i=1;i&amp;lt;argc;i++)
 {
 puts(argv[i]);
 }
 
...</description>
      <category>练习题</category>
      <author>hbccc</author>
      <pubDate>2020-12-13 21:51:50 +0800</pubDate>
    </item>
    <item>
      <title>C PRIMER PLUS 6 P276 第七题</title>
      <link>https://blog.bccn.net/hbccc/67419</link>
      <description>#include &amp;lt;stdio.h&amp;gt;
#include &amp;lt;string.h&amp;gt;
#include &amp;lt;ctype.h&amp;gt;


int letter(char);




int main()
{
 char ch;
 int i;
 while((ch=getchar())!=EOF)
 {
 if(i%10==0)printf("\n");
 printf("%c=%d\t",ch,letter(ch));
 i++;
 }
 return 0;
}


int letter(char ch)
{
 in...</description>
      <category>练习题</category>
      <author>hbccc</author>
      <pubDate>2020-11-24 21:56:12 +0800</pubDate>
    </item>
    <item>
      <title>C PRIMER PLUS 6 P276 第六题</title>
      <link>https://blog.bccn.net/hbccc/67418</link>
      <description>#include &amp;lt;stdio.h&amp;gt;
#include &amp;lt;string.h&amp;gt;


void large(double*,double*,double*);




int main()
{
 
 double first,second,third;
 printf("input first:");
 scanf("%lf",&amp;amp;first);
 printf("input second:");
 scanf("%lf",&amp;amp;second);
 printf("input third:");
 scanf("%lf",...</description>
      <category>练习题</category>
      <author>hbccc</author>
      <pubDate>2020-11-24 21:39:00 +0800</pubDate>
    </item>
    <item>
      <title>小练笔</title>
      <link>https://blog.bccn.net/hbccc/67417</link>
      <description>编写程序，计算使用某快递公司运输货物的运费（用if语句）。
要求：
1)显示目的城市列表，通过输入需要选择城市。
2)输入货物重量
3)根据运费价格表来计算运费，其中首重费用为1kg以内的费用，超过1kg的部分每公斤使用续重费用计算。
4)1kg内的总运费=首重费用
大于1kg的总运费=首重费用+（重量-1）*续重
城市&amp;nbsp;&amp;nbsp;&amp;nbsp; 费用
广东&amp;nbsp;&amp;nbsp;&amp;nbsp; 首重8元，续重2元
上海&amp;nbsp;&amp;nbsp;&amp;nbsp; 首重9元，续重7元
北京&amp;nbsp;&amp;nbsp;&amp;nbsp; 首重12元，续重10元
东三省&amp;nbsp...</description>
      <category>练习题</category>
      <author>hbccc</author>
      <pubDate>2020-11-23 19:54:51 +0800</pubDate>
    </item>
    <item>
      <title>C PRIAMER PLAS 第六版 P276 第三题</title>
      <link>https://blog.bccn.net/hbccc/67414</link>
      <description>#include &amp;lt;stdio.h&amp;gt;
void small(char,int,int);
int main(void)
{
&amp;nbsp;&amp;nbsp;&amp;nbsp; int x,y;
&amp;nbsp;&amp;nbsp;&amp;nbsp; char ch;
&amp;nbsp;&amp;nbsp;&amp;nbsp; printf("zifu:");
&amp;nbsp;&amp;nbsp;&amp;nbsp; ch=getchar();
&amp;nbsp;&amp;nbsp;&amp;nbsp; printf("lie:");
&amp;nbsp;&amp;nbsp;&amp;nbsp; scanf("%d",&amp;amp;y);
&amp;nbsp;&amp;nbsp;&amp;nbsp; p...</description>
      <category>练习题</category>
      <author>hbccc</author>
      <pubDate>2020-11-22 21:50:57 +0800</pubDate>
    </item>
    <item>
      <title>CPRIMERPLUS6 P242 第4题</title>
      <link>https://blog.bccn.net/hbccc/67413</link>
      <description>#include &amp;lt;stdio.h&amp;gt;
#include &amp;lt;string.h&amp;gt;
#include &amp;lt;ctype.h&amp;gt;


int main(void)
{
 int ch=0;
 int up=0,a=0,b=0;
 int count=0,let=0;
 double pj;
 
 while((ch=getchar())!=EOF)
 {
 a=isalpha(up);
 if(a)a=1;
 b=isalpha(ch);
 if(b){b=1;let++;}
 if(a==0&amp;amp;&amp;amp;b==1)coun...</description>
      <category>练习题</category>
      <author>hbccc</author>
      <pubDate>2020-11-21 11:56:41 +0800</pubDate>
    </item>
    <item>
      <title>CPRIMERPLUS6 P216 第11题</title>
      <link>https://blog.bccn.net/hbccc/67412</link>
      <description>#include &amp;lt;stdio.h&amp;gt;

#define pyj 2.05&amp;nbsp; &amp;nbsp; &amp;nbsp;/* 洋蓟：2.05美元/磅 */&amp;nbsp;
#define ptc 1.15&amp;nbsp; &amp;nbsp; &amp;nbsp;/* 甜菜：1.15美元/磅 */
#define phlb 1.09&amp;nbsp; &amp;nbsp; /*胡萝卜：1.09美元/磅 */
#define b100d 100&amp;nbsp; &amp;nbsp; /*100美元订单有5%的优惠*/
#define yhu 0.05&amp;nbsp; &amp;nbsp; &amp;nbsp;/*100美元订单有5%的优惠*/...</description>
      <category>练习题</category>
      <author>hbccc</author>
      <pubDate>2020-11-19 21:51:58 +0800</pubDate>
    </item>
    <item>
      <title>CPRIMERPLUS6 P215 第10题</title>
      <link>https://blog.bccn.net/hbccc/67411</link>
      <description>
	#include &amp;lt;stdio.h&amp;gt;
//#include &amp;lt;string.h&amp;gt;

#define sin 17850
#define huz 23900
#define yig 29750
#define yil 14875
#define ftax 0.15
#define stax 0.28


void menu(void);
void star(int i);
double single(int doll,int base);
double huzhu(int doll);




int main(void)...</description>
      <category>练习题</category>
      <author>hbccc</author>
      <pubDate>2020-11-18 21:57:48 +0800</pubDate>
    </item>
    <item>
      <title>CPRIMERPLUS6 P215 第九题</title>
      <link>https://blog.bccn.net/hbccc/67410</link>
      <description>#include &amp;lt;stdio.h&amp;gt;
bool sushu(int num);

int main(void)
{
 int num;
 printf("input:");
 scanf("%d",&amp;amp;num);
 if(num&amp;lt;=0)printf("sorry");
 for(int i=3;i&amp;lt;=num;i++)
 {
 &amp;nbsp; &amp;nbsp; if(sushu(i)==1) printf("%d\t",i);
 }
 return 0;
}
bool sushu(int num)
{
 bool judge=tru...</description>
      <category>练习题</category>
      <author>hbccc</author>
      <pubDate>2020-11-18 20:56:08 +0800</pubDate>
    </item>
    <item>
      <title> bool  .c  .cpp</title>
      <link>https://blog.bccn.net/hbccc/67409</link>
      <description>
	今天发现一个小秘密：


	写代码时使用了bool类型，奇怪的是，编译报错，前两天我在另一台电脑都使用正常啊，为什么呢，经过一番上网搜索，终于发现，在DEV C++里，如果源程序扩展名是 .c 则编译报错，如果扩展名是 .cpp，则编译通过，理由是，.c，编译器则按C语言编译，而C语言没有bool类型。.cpp 编译器则按C++语言编译，C++有 bool 类型。
</description>
      <category>C</category>
      <author>hbccc</author>
      <pubDate>2020-11-16 17:27:38 +0800</pubDate>
    </item>
    <item>
      <title>C primer plus P175 第五题  金字塔</title>
      <link>https://blog.bccn.net/hbccc/67408</link>
      <description>#include &amp;lt;stdio.h&amp;gt;




int main(void)
{
 
 char ch;
 bool boo;
 do
 {
 boo=true;
 &amp;nbsp; &amp;nbsp; printf("Input:");
 &amp;nbsp; &amp;nbsp; scanf("%c",&amp;amp;ch);
 &amp;nbsp; &amp;nbsp; if(ch=15) scanf("%c",&amp;amp;ch);
 &amp;nbsp; &amp;nbsp; if(ch&amp;lt;'A' or ch&amp;gt;'Z')
 &amp;nbsp; &amp;nbsp; {
 &amp;nbsp; &amp;nbsp;  pr...</description>
      <category>练习题</category>
      <author>hbccc</author>
      <pubDate>2020-11-15 15:07:48 +0800</pubDate>
    </item>
    <item>
      <title>华氏摄氏开氏 C primer plus 第五章第九题</title>
      <link>https://blog.bccn.net/hbccc/67407</link>
      <description>#include &amp;lt;stdio.h&amp;gt;
#define shehua 5.0/9.0
void temperatrues(double ccc);
const int a=32;
int main(void)
{
 double hua;
 printf("input hua:");
 while(scanf("%lf",&amp;amp;hua))
 {
&amp;nbsp; &amp;nbsp; &amp;nbsp;temperatrues(hua);
 &amp;nbsp; &amp;nbsp; printf("input hua:");
 }
 printf("finish");
 ret...</description>
      <category>练习题</category>
      <author>hbccc</author>
      <pubDate>2020-11-14 15:28:38 +0800</pubDate>
    </item>
    <item>
      <title>头文件h</title>
      <link>https://blog.bccn.net/hbccc/67406</link>
      <description>
	#include &amp;lt;stdio.h&amp;gt; 


	//printf()；
//scanf()
&amp;nbsp; 如果是1个参数，成功读取，返回1，如果是两个参数，成功读取，返回2，如果读取不成功，返回0；
//gets()
&amp;nbsp; 读取字符串，并且舍弃换行。常于puts()配对使用。
//puts(地址)
&amp;nbsp; 只显示字符串，而且自动在显示的字符串末尾加上换行符。
//fgets(目标字符串数组，大小，设备)
&amp;nbsp; 读取字符串，末尾加上换行符，可以从不同设备读取，如键盘（stdin）、文件等，该函数只读取 大小-1 个字符
//fp...</description>
      <category>C</category>
      <author>hbccc</author>
      <pubDate>2020-11-14 11:48:27 +0800</pubDate>
    </item>
    <item>
      <title>C primer plus第六版 P371 第十题</title>
      <link>https://blog.bccn.net/hbccc/67226</link>
      <description>
	//求字符串长度


	#include &amp;lt;stdio.h&amp;gt;


	


	int strlenc(char *);


	


	int main(void)


	{


	&amp;nbsp; &amp;nbsp; char a[100]={0};


	&amp;nbsp; &amp;nbsp;&amp;nbsp;


	&amp;nbsp; &amp;nbsp; puts("please input:");


	&amp;nbsp; &amp;nbsp;&amp;nbsp;


	&amp;nbsp; &amp;nbsp; scanf("%s",a);


	&amp;nbsp; &amp;nbs...</description>
      <category>练习题</category>
      <author>hbccc</author>
      <pubDate>2020-05-27 21:13:58 +0800</pubDate>
    </item>
    <item>
      <title>C C C</title>
      <link>https://blog.bccn.net/hbccc/67090</link>
      <description>C语言看了一段时间，感觉没啥进步，都在原地踏步，啥时候能有所突破呢。唉.....</description>
      <category>默认分类</category>
      <author>hbccc</author>
      <pubDate>2020-04-26 21:10:42 +0800</pubDate>
    </item>
    <item>
      <title>小练习：求身份证最后一位</title>
      <link>https://blog.bccn.net/hbccc/67089</link>
      <description>#include &amp;lt;stdio.h&amp;gt;


int main(void)
{
 char id[17];
 int idx[17]={7,9,10,5,8,4,2,1,6,3,7,9,10,5,8,4,2};
 char last[11]={'1','0','X','9','8','7','6','5','4','3','2'};
 int sum=0,i;
 printf("Please input ID:");
 for (int i=0;i&amp;lt;17;i++)
 {
 scanf("%c",&amp;amp;id[i]);
 //printf("%c"...</description>
      <category>练习题</category>
      <author>hbccc</author>
      <pubDate>2020-04-23 22:06:50 +0800</pubDate>
    </item>
    <item>
      <title>C语言程序设计现代方法第二版P196页第9题和第12题</title>
      <link>https://blog.bccn.net/hbccc/67076</link>
      <description>
	第9题：


	#include &amp;lt;stdio.h&amp;gt;


double inpr(const double*a,const double*b,int n);


int main(void)
{
 double a1[3]={1.1,2.2,3.3};
 double b1[3]={4.4,5.5,6.6};
 
 printf("%.2f",inpr(a1,b1,3));
 
 return 0;
}


double inpr(const double*a,const double*b,int n)
{
 const do...</description>
      <category>练习题</category>
      <author>hbccc</author>
      <pubDate>2020-04-12 16:45:39 +0800</pubDate>
    </item>
    <item>
      <title>C语言程序设计现代方法第二版P182第六题</title>
      <link>https://blog.bccn.net/hbccc/67075</link>
      <description>#include &amp;lt;stdio.h&amp;gt;


#define N 10
void ftl(int [],int,int*,int*);


int main(void)
{
 //int a[N]={1,287,100,92,287,920,56,98,24,88};
 int big,big2;
 for(int i=0;i&amp;lt;N;i++)
 {
 printf("a[%d]==",i);
 scanf("%d",&amp;amp;a[i]);
 }
 
 ftl(a,N,&amp;amp;big,&amp;amp;big2);
 
 printf("\n\n...</description>
      <category>练习题</category>
      <author>hbccc</author>
      <pubDate>2020-04-11 11:34:28 +0800</pubDate>
    </item>
  </channel>
</rss>
