不知道這樣寫 算不算 完成任務(wù)?
using System;
using System.Collections.Generic;
using System.Text;
namespace projAboveAvg
{
? ? class Program
? ? {
? ? ? ? static void Main(string[] args)
? ? ? ? {
? ? ? ? ? ? Console.WriteLine("全班八個(gè)雞頭姓名及帶妞分?jǐn)?shù)");
? ? ? ? ? string[] name=new string[]{"景珍","林惠洋","成蓉","洪南昌","龍玉民","單江開","田武山","王三明"};
? ? ? ? ? foreach(string x in name)
? ? ? ? ? {
? ? ? ? ? ? ? Console.Write(x+" ");
? ? ? ? ? }
? ? ? ? ? Console.WriteLine();
? ? ? ? ? int[] sum=new int[]{90,65,88,70,46,81,100,68};
? ? ? ? ? foreach(int k in sum)
? ? ? ? ? {
? ? ? ? ? ? ? Console.Write(k+"? ?");
? ? ? ? ? }
? ? ? ? ? Console.WriteLine();
? ? ? ? ? Console.WriteLine("全班八個(gè)雞頭帶妞總分為");
? ? ? ? ? int nsm=0;
? ? ? ? ? int[] gtr=new int[]{90,65,88,70,46,81,100,68};
? ? ? ? ? for(int i=0;i<gtr.Length;i++)
? ? ? ? ? {
? ? ? ? ? ? ? nsm+=sum[i];
? ? ? ? ? }
? ? ? ? ? {
? ? ? ? ? int dnf=0;
? ? ? ? ? dnf+=nsm;
? ? ? ? ? Console.WriteLine(dnf+"分");
? ? ? ? ? Console.WriteLine("帶妞平均分為");
? ? ? ? ? dnf/=8;
? ? ? ? ? Console.WriteLine(dnf+"分");
? ? ? ? ? }
? ? ? ? ? Console.WriteLine("雞頭帶妞分大于平均分的有");
? ? ? ? ? int []mus=new int[]{90,65,88,70,46,81,100,68};
? ? ? ? ? for(int j=0;j<mus.Length;j++)
? ? ? ? ? {
? ? ? ? ? ? ? if(sum[j]>76)
? ? ? ? ? ? ? {
? ? ? ? ? ? ? Console.Write("? ?"+sum[j]+" ");
? ? ? ? ? ? ? }
? ? ? ? ? }
? ? ? ? ? Console.WriteLine();
? ? ? ? ? Console.WriteLine("雞頭姓名:經(jīng)期 成聾 穿山甲 犁田閃");
? ? ? ? ? string[] pjfs=new string[]{"平均分是76,","高于平均分的有:"};
? ? ? ? ? foreach(string x in pjfs)
? ? ? ? ? {
? ? ? ? ? ? ? Console.Write(x);
? ? ? ? ? ? ? ??
? ? ? ? ? }
? ? ? ? ? Console.WriteLine();??
? ? ? ? ? Console.Write("景珍 成蓉 單江開 田武山 請(qǐng)按任意鍵");
? ? ? ? ??
? ? ? ? ??
? ? ? ? }
? ? }
}
//
運(yùn)行成功
全班八個(gè)雞頭姓名及帶妞分?jǐn)?shù) 景珍?林惠洋?成蓉?洪南昌?龍玉民?單江開?田武山?王三明? 90???65???88???70???46???81???100???68??? 全班八個(gè)雞頭帶妞總分為 608分 帶妞平均分為 76分 雞頭帶妞分大于平均分的有 ???90????88????81????100? 雞頭姓名:經(jīng)期?成聾?穿山甲?犁田閃 平均分是76,高于平均分的有: 景珍?成蓉?單江開?田武山?請(qǐng)按任意鍵
2021-08-03
兄弟你寫這么多 66666
2021-05-13
強(qiáng)強(qiáng)強(qiáng)