第c语言基础学习.pptxVIP

  • 0
  • 0
  • 约1.23千字
  • 约 21页
  • 2022-09-14 发布于上海
  • 举报
C/C++程序设计 第一章 C语言基础;;例1.1 求整数1到100的和;开 始;3.编写程序;;1.2.2 C语言特点 ;§1.3 C语言程序基本结构及书写风格; 1.3.2 C语言程序的书写风格 区分大小写,习惯用小写字母 不使用行号,无程序行概念 可使用空行和空格 常用锯齿形书写格式(缩进);/* example 2 calculate the sum of a and b */ main( ) { int a,b,sum; a=123;b=456; sum=a+b; printf(“sum is %d\n”,sum); };补充内容;/* example 4 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 *

文档评论(0)

1亿VIP精品文档

相关文档