int avg=0;
int sum = 0;
for(int i=0;i<num.Length;i++)
{
sum+=num[i];
avg = sum / num.Length;
if(num[i]>avg)
{
Console.WriteLine(..);
}
}
int sum = 0;
for(int i=0;i<num.Length;i++)
{
sum+=num[i];
avg = sum / num.Length;
if(num[i]>avg)
{
Console.WriteLine(..);
}
}
Student [] a=new Student[8];
a[0].name="吴松";a[0].score=89;
a[1].name="钱东宇";a[1].score=90;
a[2].name="伏晨";a[2].score=98;
a[3].name="周蕊";a[3].score=60;
a[4].name="林日鹏";a[4].score=91;
a[5].name="何昆";a[5].score=93;
等。。。。
a[0].name="吴松";a[0].score=89;
a[1].name="钱东宇";a[1].score=90;
a[2].name="伏晨";a[2].score=98;
a[3].name="周蕊";a[3].score=60;
a[4].name="林日鹏";a[4].score=91;
a[5].name="何昆";a[5].score=93;
等。。。。
using System;
using System.Collections.Generic;
using System.Text;
namespace Test
{
class Program
{
static void Main(string[] args)
{
double d = 2.5;
double x = d +(double) 1;
Console.WriteLine(x);
}
}
}
using System.Collections.Generic;
using System.Text;
namespace Test
{
class Program
{
static void Main(string[] args)
{
double d = 2.5;
double x = d +(double) 1;
Console.WriteLine(x);
}
}
}
2018-02-02
string[] b = new string[]{"吴松","钱东宇","伏晨","陈陆","周蕊","林日鹤","何昆","关欣"};
int[] a = new int[] { 89,90,98,56,60,81,83,85};
int max=a[0];
string mu=b[0];
for(int i=1;i<a.Length;i++)
{
if(max<a[i])
{
max=a[i];
mu=b[i];
}
}
Console.Write("分数最高的是{0},分数是{1}",mu,max);
int[] a = new int[] { 89,90,98,56,60,81,83,85};
int max=a[0];
string mu=b[0];
for(int i=1;i<a.Length;i++)
{
if(max<a[i])
{
max=a[i];
mu=b[i];
}
}
Console.Write("分数最高的是{0},分数是{1}",mu,max);
Console.WriteLine("O.....O");
Console.WriteLine(".O...O.");
Console.WriteLine("..O.O..");
Console.WriteLine("...O...");
Console.WriteLine("..O.O..");
Console.WriteLine(".O...O.");
Console.WriteLine("O.....O");
哈哈哈哈哈
Console.WriteLine(".O...O.");
Console.WriteLine("..O.O..");
Console.WriteLine("...O...");
Console.WriteLine("..O.O..");
Console.WriteLine(".O...O.");
Console.WriteLine("O.....O");
哈哈哈哈哈