C
C
C
C
C – Dennis Ritchie
B – Ken Thompson
BCPL – Martin Richards
C
C -What
——
3ml5ml4ml
1) 3ml5ml
2) 3ml5ml
3) 5ml
4) 3ml1ml5ml
5) 3ml5ml
6) 5ml4ml
——
1
1x,y
2x+y
3(x+y)
Begin
Input x,y
Display x+y
end
x,y
x+y
1
2
1
2
N-S
1a
b
a+b
(a+b)
Start
INPUT
C=A+B
DISPLAY C
Stop
()
AB
XY
2X>YX
3Y
1000,100010
5!
i+1
1+2+3…… +99+100
C
#include <stdio.h> //
void main()
{
int a;
int b;
int sum;
printf("a");
scanf("%d",&a); //a
printf("b");
scanf("%d",&b); //b
sum=a+b;
printf("sum=%d\n",sum); /*sum*/
}
#include <stdio.h>
void main() //
{
double s=3.1415926;
float r;
double area;
printf("");
scanf("%f",&r);
area=s*r*r;
printf("area=%lf\n",area);
}
#include
#
C-How
——
——
——
——
——
——
——
1.
2.n35
3.100200
4.