modify starter
This commit is contained in:
parent
e8d9d0751b
commit
8f163af26b
14
starter.c
14
starter.c
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue