From 8f163af26b06c4953aa64a8ea549f3937d25da32 Mon Sep 17 00:00:00 2001 From: juan Date: Thu, 23 Sep 2021 15:37:40 +0800 Subject: [PATCH] modify starter --- starter.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/starter.c b/starter.c index 4f0fdab..676f3db 100644 --- a/starter.c +++ b/starter.c @@ -1,6 +1,20 @@ +/*+-+-+-+-+-+ +-+-+-+-+-+*/ +/*|h|e|l|l|o| |w|o|r|l|d|*/ +/*+-+-+-+-+-+ +-+-+-+-+-+*/ + #include int main(void) { + + // ask for a string + char greeting[20]; + scanf("hello %s", greeting); + + // output strings printf("hello world\n"); + printf("This is a string %s\n", greeting); + printf("this is a float %+5.2f\n", 3.14); + printf("this is a float %+5.2f\n", -3.14); + printf("this is a decimal %+d\n", 3); return 0; }