已采纳回答 / 慕容62762
正确的应该是: if (money >= 100000) { Console.WriteLine("送一台微波炉"); } else { if (money >= 50000) { Console.WriteLine("送一套茶具"); } ...
2018-12-04
最赞回答 / lider521
///终于明白了,改正后代码如下:各位参考吧。using System;using System.Collections.Generic;using System.Text;namespace projGetMaxScore{ class Program { static void Main(string[] args) { string[,] Score = new string[2,8]{{"吴松","钱东宇","伏晨","陈陆","周蕊"...
2018-12-01
已采纳回答 / 水漪_
//你的new数组语法错了,然后max这个变量要全局变量,输出语句也放错地方了这个是我修改你代码之后的。你可以看看。string[] name = new string[] { "吴松", "钱东宇", "伏晨", "陈路", "周蕊", "林日鹏", "何昆", "关欣" }; int[] score = new int[]{ 89, 90, 98, 56, 60, 91, 93, 85 }; int max = 0; string topname=null; ...
2018-11-29
char[,] ch = { {'我','是','软'},{'件','工','程'},{'师','啦','!'}};
Console.WriteLine("{0}{1}{2}",ch[1,1],ch[1,2],ch[2,0]);
一位数组3*3的数据,进行筛选找到对应字符可以打印出来。
Console.WriteLine("{0}{1}{2}",ch[1,1],ch[1,2],ch[2,0]);
一位数组3*3的数据,进行筛选找到对应字符可以打印出来。
2018-11-28
for (int i = 0; i < score.Length ; i++)
{
if( score[i] < 60 )//筛选条件
Console.Write(score[i]+",");
}
大家要注意是score数据组里面取的值进行做对比,而不是score进行比较。
{
if( score[i] < 60 )//筛选条件
Console.Write(score[i]+",");
}
大家要注意是score数据组里面取的值进行做对比,而不是score进行比较。
2018-11-28
for (int x = 1; x < 10; x++)
{
//请添加代码,过滤3和8
if(x == 3)
continue;
else if(x == 8)
continue;
Console.Write(x);
}
{
//请添加代码,过滤3和8
if(x == 3)
continue;
else if(x == 8)
continue;
Console.Write(x);
}
2018-11-28
for (int x=1; x<13; x++)//请填写代码
{
Console.WriteLine(x+" ");
}
{
Console.WriteLine(x+" ");
}
2018-11-27