modify starter

This commit is contained in:
juan 2021-09-23 15:37:40 +08:00
parent e8d9d0751b
commit 8f163af26b

View file

@ -1,6 +1,20 @@
/*+-+-+-+-+-+ +-+-+-+-+-+*/
/*|h|e|l|l|o| |w|o|r|l|d|*/
/*+-+-+-+-+-+ +-+-+-+-+-+*/
#include <stdio.h>
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;
}