C语言程序题

时间:2014-12-22 13:47:37
【文件属性】:
文件名称:C语言程序题
文件大小:72KB
文件格式:DOC
更新时间:2014-12-22 13:47:37
C 程序程序题 程序题 ①求1!+2!+.....+20! #include Void main() {double s =0,t=1; Int n; For (n=1;n<=20;n++) { T=t*n; S=s+t; } Printf("1!+2!+...+20!=%22.15e\n",s); } ②求一个3*3的整形二维数组对角线元素之和 #include Void main () { Int a[3] [3] ,sum=0; Int i,j; Printf( "enter data:\n") ;

网友评论