最赞回答 / qq_夜星辰_0
using System;using System.Collections.Generic;using System.Text;namespace Test{ class Program { static void Main(string[] args) { //请完善代码 for(int i = 1; i<=7 ; i++){ for(int j=1;j<=...
2016-10-18
for (int y = 1; y <= 7; y++)
{
for (int x = 1; x <= y; x++)
{
Console.Write(x);
}
Console.WriteLine();//换行
{
for (int x = 1; x <= y; x++)
{
Console.Write(x);
}
Console.WriteLine();//换行
2016-10-17
Console.WriteLine("我的工资奖金总额是{0}元",salary+ prize);
Console.WriteLine("我的税后收入是{0}元",salary+ prize- tax);
网页bug
Console.WriteLine("我的税后收入是{0}元",salary+ prize- tax);
网页bug
2016-10-16
money>=50000&&money<100000
money>=1000&&money<50000
不懂为什么这么编写会错
money>=1000&&money<50000
不懂为什么这么编写会错
string[] name = { "吴松", "钱东宇", "伏晨", "陈陆", "周蕊", "林日鹏", "何昆", "关欣" };
int[] score = { 89, 90, 98, 56, 60, 91, 93, 85 }; int max =0,x=0; for (int i = 0; i < score.Length; i++)
{ if (score[i] > max) { max = score[i]; x = i; } } Console.Write("分数最高的是{0},分数是{1}",name[x],max); 还需要获取最大值对应的索引
int[] score = { 89, 90, 98, 56, 60, 91, 93, 85 }; int max =0,x=0; for (int i = 0; i < score.Length; i++)
{ if (score[i] > max) { max = score[i]; x = i; } } Console.Write("分数最高的是{0},分数是{1}",name[x],max); 还需要获取最大值对应的索引
//判断本月工资够不够买手机
if (salary >= price)
{
Console.WriteLine("这月工资够买手机!");
}
else
{
Console.WriteLine("这月工资不够买手机!");
}
if (salary >= price)
{
Console.WriteLine("这月工资够买手机!");
}
else
{
Console.WriteLine("这月工资不够买手机!");
}
//声明整型数组,保存一组整数
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]+",");
}
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]+",");
}
int[] score = new int[] {89,39,100,51,94,65,70 };//分数
Console.Write("不及格的有:");
for (int i = 0; i <score.Length ; i++)
{
if(score[i]<60)//筛选条件
Console.Write(score[i]+",");
Console.Write("不及格的有:");
for (int i = 0; i <score.Length ; i++)
{
if(score[i]<60)//筛选条件
Console.Write(score[i]+",");
2016-10-14