正在加载图片...
C语言程序设 第一章C语言概述 example11 calculate the sum of a and b*/ include <stdio. h> 预处理令 This is the main program */ maino i int a, b, sum 函数 注释 a=10 sum=add(a, b) 语句 printf( sum=/\n, sum / This fanction calculates the sum of x and y */ int add(int x, int y) i int Z=X+y, 运行结果 return (z) sum=34例1.2 /* example1.1 calculate the sum of a and b*/ #include <stdio.h> /* This is the main program */ main() { int a,b,sum; a=10; b=24; sum=add(a,b); printf(”sum= %d\n",sum); } /* This function calculates the sum of x and y */ int add(int x,int y) { int z; z=x+y; return(z); } 运行结果: sum=34 函数 语句 预处理命令 注释 C语言程序设计 第一章 C语言概述 >
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有