17abe37e4aee38cc79d91dd069a37d7e91d5bef53Shih-wei Liao#include <stdio.h> 27abe37e4aee38cc79d91dd069a37d7e91d5bef53Shih-wei Liao 37abe37e4aee38cc79d91dd069a37d7e91d5bef53Shih-wei Liao/* putchard - putchar that takes a double and returns 0. */ 47abe37e4aee38cc79d91dd069a37d7e91d5bef53Shih-wei Liaoextern double putchard(double X) { 57abe37e4aee38cc79d91dd069a37d7e91d5bef53Shih-wei Liao putchar((char)X); 67abe37e4aee38cc79d91dd069a37d7e91d5bef53Shih-wei Liao return 0; 77abe37e4aee38cc79d91dd069a37d7e91d5bef53Shih-wei Liao} 87abe37e4aee38cc79d91dd069a37d7e91d5bef53Shih-wei Liao 97abe37e4aee38cc79d91dd069a37d7e91d5bef53Shih-wei Liao/* printd - printf that takes a double prints it as "%f\n", returning 0. */ 107abe37e4aee38cc79d91dd069a37d7e91d5bef53Shih-wei Liaoextern double printd(double X) { 117abe37e4aee38cc79d91dd069a37d7e91d5bef53Shih-wei Liao printf("%f\n", X); 127abe37e4aee38cc79d91dd069a37d7e91d5bef53Shih-wei Liao return 0; 137abe37e4aee38cc79d91dd069a37d7e91d5bef53Shih-wei Liao} 14