From 8e1ee26b64a3cd1275ef7e45a673aff830477225 Mon Sep 17 00:00:00 2001 From: wandoubaba517 Date: Tue, 5 Dec 2023 20:50:12 +0800 Subject: [PATCH] printout.c --- c04_string/printout.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 c04_string/printout.c diff --git a/c04_string/printout.c b/c04_string/printout.c new file mode 100644 index 0000000..51c8a8d --- /dev/null +++ b/c04_string/printout.c @@ -0,0 +1,18 @@ +/* printout.c - 使用转换说明 */ +#include + +#define PI 3.1415927 + +int main(void) +{ + int number = 7; + float pies = 12.75; + int coast = 7800; + + printf("The %d contestants ate %f berry pies.\n", number, pies); + printf("The value of pi is %f.\n", PI); + printf("Farewell! thou art too dear for my possessing,\n"); + printf("%c%d\n", '$', 2 * coast); + + return 0; +} \ No newline at end of file