全文预览

谭浩强C程序设计例题代码

上传者:非学无以广才 |  格式:pdf  |  页数:86 |  大小:3303KB

文档介绍
T0s4]4red4); break;\rcase yellow:printf (4F-10s4]“yellow");break; case blue:printf(^%-\r10s4]4blue4);break; case white:printf("%¹10s4]“white");break; case\rblack:printf(4%-10s4, “black");break; }\r}\rprintf (4\n4)X\r)\r)\rprintf(4\ntotal:%5d\n4,n);\r)\rò Æ ¹ 10 ÉóQôõp\rttinclude <stdlib. h>.\rttinclude <stdio. h>\r#include<conio. h>\r#include <time. h>\r# include 4mathp h4\rint mainO\r(\rint i; int j [10];\rsrand(time(NULL)) ;\rprintf(4Ten random numbers from 0 to 99\n\n4)X\rfor(i=0; i<10; i++)\r(\rj[i] = (rand()%10)50 -\r)\rfor(i=0; i<10; i++)\r(\rprintf (z/%d\n/z, j[i]);\rprintf (]z%f\n]z, (double) j[i]/10) ; }\r// srand(time(NULL));\r// printf (]]%f\n/], (rand ()%10)/10);\rgetchO ;\rreturn 0;\r} - 51 ¹

收藏

分享

举报
下载此文档