摘要:
static void Main(string[] args) { //青歌赛20位评委打分 //建立一个可以接收20位评委打分的数组 int[] a = new int[20]; double pjf = 0; for (int i = 0; i <a.Length; i++) { Console 阅读全文
posted @ 2016-04-24 21:54
By_The_Way
阅读(166)
评论(0)
推荐(0)
摘要:
foreach( 对集合每个元素的引用 in 集合 ){ } int[] a = new int[5]{1,2,3,4,5};foreach( int b in a ){ //b就是a中的每个元素} 注意:1.foreach只能对集合进行遍历。2.foreach在操作集合的时候,只能读不能改。 3. 阅读全文
posted @ 2016-04-24 21:49
By_The_Way
阅读(175)
评论(0)
推荐(0)
浙公网安备 33010602011771号