自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(9)
  • 收藏
  • 关注

原创 C Prime Plus中文第六版编程题——第十四章练习

#include <stdio.h>#include <stdlib.h>#include <string.h>void count_days(char *str);char* s_gets(char *str,int n);struct month { char name[10]; char abbr[4]; int d...

2020-03-19 23:23:59 1469

原创 C Prime Plus中文第六版编程题——第十三章练习

修改程序清单13.1中的程序,要求提示用户输入文件名,并读取用户输入的信息,不使用命令行参数/* count.c -- using standard I/O */#include <stdio.h>#include <stdlib.h> // exit() prototypeint main( ){ int ch; // place ...

2020-03-05 12:25:59 949 2

原创 C Prime Plus中文第六版编程题——第十二章练习

不使用全局变量,重写程序清单12.4。#include <stdio.h>#include <stdlib.h>int main(){ int units; printf("How many pounds to a firkin of butter?\n"); scanf("%d",&units); while...

2020-02-24 23:18:07 682

原创 C Prime Plus中文第六版编程题——第十一章练习

设计并测试一个函数,从输入中获取下n个字符(包括空白、制表 符、换行符),把结果储存在一个数组里,它的地址被传递作为一个参数。#include <stdio.h>#include <stdlib.h>#define N 20void * string_getn(char *str,int n);int main(){ char...

2020-02-22 18:19:02 1858 3

原创 C Prime Plus中文第六版编程题——第九章练习

1.设计一个函数min(x, y),返回两个double类型值的较小值。在一个简单 的驱动程序中测试该函数。#include <stdio.h>#include <stdlib.h>double min(double x,double y);int main(){ double a,b; printf("Input:\n"); scan...

2020-02-21 16:12:52 839 1

原创 C Prime Plus中文第六版编程题——第十章练习

1.修改程序清单10.7的rain.c程序,用指针进行计算(仍然要声明并初始 化数组)。#include <stdio.h>#include <stdlib.h>#define MONTHS 12#define YEARS 5int main(){ const float rain[YEARS][MONTHS]={ {4.3, 4.3, ...

2020-02-15 16:46:40 667

原创 C Prime Plus中文第六版编程题——第七章练习

编写一个程序读取输入,读到#字符停止,然后报告读取的空格数、 换行符数和所有其他字符的数量。#include <stdio.h>#include <stdlib.h>int main(){ char ch; int space=0; int line_break=0; int other=0; while( (ch=get...

2020-02-12 22:33:31 436

原创 c语言哥德巴赫猜想

验证给定区间内的偶数是否满足哥德巴赫猜想——可以分解为两个质数之和,并输出其质数对。e.g. 4=2+2 6=3+3 8=3+5 ……#include <stdio.h>#include <stdlib.h>int is_prime(int k);int main(){ int max,min; int number; int par...

2020-01-31 21:03:02 5528 1

原创 C语言倒计时

从3:00 2:59……到0:03 0:02 0:01#include <stdio.h>#include <stdlib.h>#include <windows.h>#define MINUTE 3#define SECOND 0int main(){ int mins,seconds; mins=MINUTE; ...

2020-01-30 22:32:25 1666 3

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除