C语言初级入门范例(仅供教学参考):
ex1.cpp : case statement ,grade ABCDE
ex2.cpp : learn scanf,printf,variable define,assign
ex3.cpp : if statement, segment function
ex4.cpp : multi if statement nest, segment function
ex5.cpp : while statement ,get sum :1+2+3+...+100
ex6.cpp : for statement, get N!
ex7.cpp : two for statement nest,get sum and product
ex8.cpp : init a[10], sum of array a[0..9 ]
ex9.cpp : input a[i]; printf a[i],sum of array a[0..9 ]
ex10.cpp: init a[3][4], scanf a[i][j] ,and printf a[i][j]
ex11.cpp: init a[3][4], scanf a[i][j] ,and get max value
break: break ,continue usage in for statement
myfunction: function define ,call, get n! call itsself
pointer: pointer variable define ,get address of variable
struct: define struct type ,inital,output
教学范例C源码下载:C语言入门教学范例