
c语言程序设计
博悦1991911
这个作者很懒,什么都没留下…
展开
-
C语言程序设计习题 1-12 编写一个程序,以每行一个单词的形式打印其输出。
/*******Author: 时光伴岁月************************//*******Date: 20170903****************************/#include<stdio.h>#define IN 1#define OUT 0int main(int argc,char *argv[]){ int c; int statu原创 2017-09-03 21:05:43 · 1504 阅读 · 2 评论 -
C语言程序设计习题 1-9 编写一个将输入复制到输出的程序,并将其中连续多个空格用一个空格代替
/*******Author: 时光伴岁月************************//*******Date: 20170902****************************/#include<stdio.h>int main(int argc,char *argv[]){ int c; int n=0; while((c=getchar())!=EOF原创 2017-09-02 14:42:14 · 1940 阅读 · 1 评论 -
C语言程序设计习题1-19 编写函数reverse(s),实现字符串的倒序,并用该函数每次颠倒一个输入行中的字符顺序
/*******Author: 时光伴岁月************************//*******Date: 20170908****************************/#include<stdio.h>#include<string.h>#define MAX_LENGTH 1000void array_reverse(char s[]){ int i,j;原创 2017-09-08 08:31:54 · 2430 阅读 · 0 评论 -
C语言程序设计习题1-18 删除每个输入行末尾的空格或制表符,并删除完全是空格的行
/*******Author: 时光伴岁月************************//*******Date: 20170905****************************/#include<stdio.h>#include<string.h>#define MAXLINE 10000int get_line(char s[],int lim){ int c原创 2017-09-05 22:39:25 · 1285 阅读 · 0 评论 -
C语言程序设计习题1-17 编写一个程序,打印长度大于80个字符的所有输入行
/*******Author: 时光伴岁月************************//*******Date: 20170905****************************/#include<stdio.h>#define MAXLINE 10000int get_line(char s[],int lim){ int c,i,j=0; for(i=原创 2017-09-05 21:54:27 · 1255 阅读 · 0 评论 -
C语言程序设计习题1-16 打印任意长度的输入行的长度,并尽可能多地打印文本
/*******Author: 时光伴岁月************************//*******Date: 20170905****************************/#include<stdio.h>#define MAXLINE 1000int get_line(char s[],int lim){ int c,i,j=0; for(i=0原创 2017-09-05 08:31:42 · 521 阅读 · 0 评论 -
C语言程序设计习题 1-10 将制表符替换为\t,回退符替换为\b,反斜杠替换为\\
/*******Author: 时光伴岁月************************//*******Date: 20170902****************************/#include<stdio.h>int main(int argc,char*argv[]){ int c; while((c=getchar())!=EOF) {原创 2017-09-02 15:16:59 · 1579 阅读 · 0 评论 -
C语言程序设计习题1-13 水平方向打印单词长度直方图
/*******Author: 时光伴岁月************************//*******Date: 20170903****************************/#include<stdio.h>#define MAXHIST 15#define MAXWORD 11#define IN 1#define OUT 0int main(int argc,ch原创 2017-09-03 21:47:14 · 376 阅读 · 0 评论 -
C语言程序设计习题 1-8 编写一个统计空格,制表符与换行符个数的程序
// '\t' 制表符 '\n' 换行符/*******Author: 时光伴岁月************************//*******Date: 20170902****************************/#include<stdio.h>int main(void){ int count_tab=0; int count_newline=0;原创 2017-09-02 14:32:02 · 3802 阅读 · 1 评论