第03章

第03ç«&...

Info iconThis preview shows pages 1–6. Sign up to view the full content.

View Full Document Right Arrow Icon
3 第第第第第第第第 为为为为为为为为为为为为为为为为为为为为为为为为为为为为为为为为为为为为为为为为为为为为为为为为为为为为为为为为为为为 C 为为为为为为为为为为为为为 C 为为为为为为为为为为为为为为为为 3.1 第第第第第——printf()第第 3.2 第第第第第——scanf()第第 3.3 第第第第第第第第——getchar()第putchar()第第 3.4 第第第第第第第第 第第第第第第第第第第──第第第第第第第第 [Return]
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
3.1 第第第第第—— printf() 第第 printf() 为为为为为为为为为为为为为为为为为为为为为为为为为为为为为为为为为为为为为为为为为为为为 3.1.1 printf() 第第第第第第第 [ 第第 3.1 ] 为为为为为 radius=1.5 为为为为为为为为为为 /* 为为为为为为为为 AL3_1.C 为 */ main() {float radius,length,area,pi=3.1415926; radius=1.5; length=2*pi*radius; /* 为为为为 */ area=pi*radius*radius; /* 为为为为 */ printf(“radius=%f\n”,radius); /* 为为为为为 */ printf(“length=%7.2f,area=%7.2f\n”,length,area); /* 为为为为为为为为 */ } [ 第第第第 ]
Background image of page 2
为为为为为为为为为 radius=1.500000 length= 9.42,area= 7.07 printf() 为为为为为为为为为为 printf(" 第第第第第 " [ 第第第第第 ]) 第 1 为为为为为为为“为为为为为”为为“为为为为为为为”为为为为为为为为为为 为 1 为为为为为为为为为为为为为为为为为为为为 %[ 第第 ][ 第第 ][. 第第 ][F|N|h|L][ 第第 ] 为为为为为为为为为 3-1 为为为为为为为为为为为为为 3-2 为为为为为为为为为为为为为 3-3 为为为为为为为为为为 3-4 为为为为为为为为为为为 3-5 为为为
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
为 2 为为为为为 为为为 [ 第第 3.1 ] 为 printf() 为为为为 '\n' 为为为为为为为为为为为为为为“为为”为为为 为 3 为为为为为──为为为为为为为为为为为为为为为为为为为为为为为为为为为为为为为为为为为为 为为为 [ 第第 3.1 ] 为“ printf("radius=%f\n", radius);” 为为为 为“ radius=” 为“ printf("length=%7.2f,area=%7.2f\n", length,area);” 为为为 为“ length=” 为“ area=” 为为为为为为为为 2 为为为为为 为为为为为为为为为为为为为为为为为为为 1 为为为为 2 为为为为为为为为为为为为 printf() 为为为为为为为为 为 1 为 printf("I am a student.\n"); 为 2 为 printf("%d",3+2); 为 3 为 printf("a=%f b=%5d\n", a, a+3); 第第第第 为“为为为为为”为为为为为为为为为为为“为为为为”为为为为为为为为为为为为为为为为为为为为为为为
Background image of page 4
3.1.2 第第第第第 为为为为为为为为为为为为为为为为为为为为为为为 1 第第第第第第第 d── 第第第第第第第第第第第第第第第 [ 第第 3.2 ] 为为为为为为 d 为为为为 /* 为为为为为为为为 AL3_2.C 为 */ main() {int num1=123; long num2=123456;
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 6
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 12/13/2011 for the course CS C language taught by Professor Fayou during the Summer '08 term at Tianjin University.

Page1 / 30

第03ç«&...

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online