string text=(year%4)==0?"闰年":"平年";//请填写代码
2016-10-14
int x = 1;
int sum = 0;//和,初始化为0
while (x <= 30)//循环条件
{
if ()//筛选条件
sum += x;
x++;
}
Console.Write("1-30奇数的和:"+sum);
int sum = 0;//和,初始化为0
while (x <= 30)//循环条件
{
if ()//筛选条件
sum += x;
x++;
}
Console.Write("1-30奇数的和:"+sum);
2016-10-13
string[] names =new string [] { "吴淞", "钱东宇", "伏晨", "陈陆", "周蕊", "林日鹏", "何昆", "关欣" };
int[] score = new int []{ 89, 90, 98, 50, 60, 91, 93, 85 };
int y = 0;
int a = 0;
for(int i=0;i<names.Length;i++)
{
if (y<score[i])
{
y = score[i];
a = i;
}
}
Console.WriteLine("分数最高的是" + names[a]+",分数是" + score[a]);
int[] score = new int []{ 89, 90, 98, 50, 60, 91, 93, 85 };
int y = 0;
int a = 0;
for(int i=0;i<names.Length;i++)
{
if (y<score[i])
{
y = score[i];
a = i;
}
}
Console.WriteLine("分数最高的是" + names[a]+",分数是" + score[a]);
\\这个答案有什么问题吗,提交不了。
if(money>=100000)
{Console.WriteLine("送一台微波炉");}
else if(money>=50000)
{Console.WriteLine("送一套茶具");}
else if(money>=10000)
{Console.WriteLine("送一袋大米");}
else
{Console.WriteLine("没有礼品");}
if(money>=100000)
{Console.WriteLine("送一台微波炉");}
else if(money>=50000)
{Console.WriteLine("送一套茶具");}
else if(money>=10000)
{Console.WriteLine("送一袋大米");}
else
{Console.WriteLine("没有礼品");}
最新回答 / weibo_林夕君Kyu_0315069
using System;using System.Collections.Generic;using System.Text;namespace Test{ class Program { static void Main(string[] args) { int x;//循环计数变量 x=5;//行① 请填写计数变量的初始化语句 while ( x&...
2016-10-11