/* Write a program to print all input lines that are longer than 80 characters. */
#include
#define MAXLINE 1000 /* maximum input line size */
#define LONGLINE 80
int getline(char line[], in...
分类:
其他好文 时间:
2015-07-26 19:15:48
阅读次数:
104
/* Write a program to print a histogram of the frequencies of different
characters in its input. */
#include
#include
#define MAXHIST 15 /* max length of histogram */
#define MAXCHAR 128 ...
分类:
其他好文 时间:
2015-07-25 15:19:27
阅读次数:
111
/* Rewrite the temperature conversion program of Section 1.2 to use a function for conversion. */
#include
float celsius(float fahr);
/* print Fahrenheit-Celsius table or fahr = 0, 20, ..., 300; f...
分类:
其他好文 时间:
2015-07-25 15:16:58
阅读次数:
112
/* Write a program to print a histogram of the lengths of words in its input.
It is easy to draw the histogram with the bars horizontal; a vertical
orientation is more challenging. */
#includ...
分类:
其他好文 时间:
2015-07-25 13:52:49
阅读次数:
128
/* Write a program that prints its input one word per line. */
#include
#define IN 1 /* inside a word */
#define OUT 0 /* outside a word */
/* print input one word per line */
main()
{
int c,...
分类:
其他好文 时间:
2015-07-25 10:45:29
阅读次数:
137
源码:https://github.com/cheesezhe/Coursera-Machine-Learning-Exercise/tree/master/ex5Introduction:In this exercise, you will implement regularized linear...
分类:
系统相关 时间:
2015-07-24 15:40:53
阅读次数:
468
/*
Write a program to print the value of EOF.
*/
#include
main()
{
printf("EOF is %d\n", EOF);
}
/*
Output:
EOF is -1
*/...
分类:
其他好文 时间:
2015-07-12 20:24:24
阅读次数:
103
/*
Write a program to count blanks, tabs, and newlines.
*/
#include
/* count blanks, tabs, and newlines */
main()
{
int c, nb, nt, nl;
nb = 0; /* number of blanks */
nt = 0; /* number of t...
分类:
其他好文 时间:
2015-07-12 20:23:41
阅读次数:
103
/*
Write a program to copy its input to its output, replacing each string of one or
more blanks by a single blank.
*/
#include
#define NONBLANK 'a'
/* replace string of blanks with a single blank...
分类:
其他好文 时间:
2015-07-12 20:22:41
阅读次数:
127