using System;
using System.Collections.Generic;
using System.Text;
namespace 遍历数组
{
class Program
{
static void Main(string[] args)
{
int passed=0;
int[] score = new int[] { 98, 76, 87, 65, 55, 68, 57, 84, 91, 100, 58, 76 };
foreach (int x in score )
if (x >= 60)
{
passed++;
Console.Write("{0,-4}",x );
}
Console.WriteLine("\n及格率:{0:p}",(double )passed /score .Length );
}
}
}
最后一个输出中,{0:p}是什么意思?