if (x >= y)
if (x >= 5)
Console.WriteLine("6");
else
if (y >= 6)
Console.WriteLine("6");
else
Console.WriteLine("6");
if (x >= 5)
Console.WriteLine("6");
else
if (y >= 6)
Console.WriteLine("6");
else
Console.WriteLine("6");
2017-06-26
已采纳回答 / 一念征途
你好,有时会因为网络繁忙等原因,代码会提交不上,可以隔断时间再提交试试,多提交几次就可以了。如果需要检查下你的代码正不正确,可以安装个visual studio(简称VS),在visual studio上运行看下结果。祝你学习顺利!
2017-06-26
最赞回答 / 一念征途
你好,C# 关键字主要分为:类型,修饰符,语句关键字,方法参数,命名空间关键字,运算符关键字,转换关键字,访问关键字,文本关键字,上下文关键字,查询关键字。而这里面没有包含“Main”,所以它不是关键字。如果需要了解更多的关键字的话 ,可以看下这个网址:https://docs.microsoft.com/zh-cn/dotnet/csharp/language-reference/keywords/types 个人感觉在实际代码中,如果不确定某个单词是不是关键字,你可以换个其他的单词进行命名...
2017-06-26
最赞回答 / 一念征途
你好, c#中的“命名空间(namespace)” 和java 中的“包(package )”相似的, 相同点:1、都是为了重用性(reusebility)——软件工程中一个非常重要的目标。2、C#里面的命名空间和Java中的包都属于访问权限的控制机制。不同点:1、C#命名空间只是一种逻辑上的结构,它允许所组织的类文件的物理存放位置与逻辑结构不一致,而Java中类文件的物理结构必须与逻辑结构一致。2、Java的package本身没有子包的概念,所有package都是并列的关系,没有谁包含谁的问题。比如:o...
2017-06-25
看来半天写了个b=true 看下面的评论,我去b=a......................................机智如你
2017-06-25
string[] info = new string[] {"p","j","k","m"};
int[] score = new int[] { 12,103,24,31};
int maxScore = score[0],maxindex = 0;
for (int x = 1; x < score.Length; x++) {
if (maxScore < score[x]) {
maxScore = score[x];
maxindex = x;
}
}
Console.Write("name: "+info[maxindex]+"'s score is : "+maxScore);
int[] score = new int[] { 12,103,24,31};
int maxScore = score[0],maxindex = 0;
for (int x = 1; x < score.Length; x++) {
if (maxScore < score[x]) {
maxScore = score[x];
maxindex = x;
}
}
Console.Write("name: "+info[maxindex]+"'s score is : "+maxScore);