21 lines
433 B
C
21 lines
433 B
C
/*+-+-+-+-+-+ +-+-+-+-+-+*/
|
|
/*|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;
|
|
}
|