-----------著名的hello world----
#include <stdio.h>
main()
{
printf("Hello world!\n");
}
-------------进阶的两者最大值------------------
#include <stdio.h>
main()
{ int a,b,c;
scanf("%d,%d",&a,&b);
c=max(a,b);
printf("\n max is:%d",c);
}
int max (int x,int y)
{
int z;
if(x>y) z=x;
else z=y;
return(z);
}
----------------------------------
变量常量
#include <stdio.h>
#define PI 3.1415926
main()
{
float r=2,c;
c=2*PI*r;
printf("%f",c);
}
--------------------------------