最新回答 / 孟德尔的怪豆
using System;using System.Collections.Generic;using System.Text;namespace Test{ class Program { static void Main(string[] args) { for (int x = 1; x < 10; x++) { if (x == 3 || x == 8) ...
2016-10-30
最新回答 / 慕粉4364288
因为x的初始值是1,while条件里面是>2才能执行循环,但是do....while循环是无条件执行一次循环的,所以无条件执行一次do里面的语句,x++后的值是2,所以输出的值是2.
2016-10-30
各位兄弟能不能按照正常思路来,这种入门级的主要看知识点,这种小程序想那么多做什么,自己知道怎么做就行了嘛
2016-10-29
为什么我的代码和答案一样并且在vs中是可以的 但是在这却不行!! 这样不通过 我的这门课程就因为这一节而无法完成!!!!!!!
2016-10-28
int[] num = new int[] { 3, 34, 42, 2, 11, 19, 30, 55, 20 };
for (int i = 0; i < num.Length; i++)
if (num[i] % 2 == 0)
{
Console.Write(num[i] + ",");
for (int i = 0; i < num.Length; i++)
if (num[i] % 2 == 0)
{
Console.Write(num[i] + ",");
string[] name=new string[]{"吴松","钱东宇","伏晨","陈陆","周蕊","林日鹏","何昆","关欣"};
int[] score = new int[] {89,90,98,56,60,91,93,85};
int max = score[0]; // max保存最大元素
int _max = 0; //保存最大元素下标,如果需要记录那个元素最大
int i;
int[] score = new int[] {89,90,98,56,60,91,93,85};
int max = score[0]; // max保存最大元素
int _max = 0; //保存最大元素下标,如果需要记录那个元素最大
int i;
已采纳回答 / 小小1七爷
using System;using System.Collections.Generic;using System.Text;namespace Test{ class Program { static void Main(string[] args) { for (int x = 1; x < 10; x++) { if(x==3||x==8) ...
2016-10-28
static void Main(string[] args)
{
int y = 5;
while (y!=0)//请输入
{
Console.Write(y+" ");
y--;//请输入
}
}
}
{
int y = 5;
while (y!=0)//请输入
{
Console.Write(y+" ");
y--;//请输入
}
}
}
2016-10-27
switch (job)
{
case "局长": Console.Write("发双黄月饼"); break;
case "处长": Console.Write("发蛋黄月饼"); break;
case "科长": Console.Write("发枣泥月饼"); break;
default: Console.Write("发五仁月饼"); break;
}
{
case "局长": Console.Write("发双黄月饼"); break;
case "处长": Console.Write("发蛋黄月饼"); break;
case "科长": Console.Write("发枣泥月饼"); break;
default: Console.Write("发五仁月饼"); break;
}
2016-10-27