6
/* Compute the greatest common divisor of positive integers */
7
int gcd(int x, int y) {
18
int gcdmain(int argc, char *argv[]) {
21
printf("usage: gcd x y\n");
26
printf("gcd(%d,%d) = %d\n", x,y,gcd(x,y));
30
int count(char *bytes, int len, char c) {
33
for (i = 0; i < len; i++) {
34
if (bytes[i] == c) count++;
39
void capitalize(char *str, int len) {
41
for (i = 0; i < len; i++) {
42
str[i] = toupper(str[i]);
46
void circle(double x, double y) {
49
printf("Bad points %g, %g\n", x,y);
51
printf("Good points %g, %g\n", x,y);