printout.c
This commit is contained in:
parent
0459caed35
commit
8e1ee26b64
18
c04_string/printout.c
Normal file
18
c04_string/printout.c
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
/* printout.c - 使用转换说明 */
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
#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;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user