string[] job = new string[4] { "经理", "项目主管", "技术总监", "财务主管" };//方法一
for (int i = 0; i < job.Length; i++)
{
Console.Write(job[i] + "");//打印职位
}
for (int i = 0; i < job.Length; i++)
{
Console.Write(job[i] + "");//打印职位
}
2023-06-24
最新回答 / 慕慕8394392
string[] name=new string[8] {"吴松","钱东宇","伏晨","陈陆","周蕊","林日鹏","何昆","关欣"}; int[] score =new int[8]{99,90,98,56,60,91,93,85}; int max = score[0]; int j = 0; for(int i=0;i<score.Length;i++...
2023-06-07
最赞回答 / qq_慕雪4435505
using System;using System.Collections.Generic;using System.Text;namespace Test{ class Program { static void Main(string[] args) { //请完善代码 for(int i=0;i<7;i++) { for(int j=0;j<7;j++)...
2023-06-07
最新回答 / wulitan
语句`Console.write((double)3)`中的`(double)`表示将整型3强制转换成双精度浮点型,所以实际上3已经被转换成了3.0。但是`Console.write()`默认输出时不会显示小数点及后面的0,因此输出的是3而非3.0。若要输出3.0,可以使用`Console.WriteLine()`方法并指定输出格式,例如:```Console.WriteLine("{0:F1}", (double)3);```其中的`{0:F1}`表示格式化输出第一个参数(即强制转换后的3),保留一位小...
2023-05-16
for(int x=1;x<=7;x++)
{
for(int y=1;y<=7;y++)
{ Console.Write(x==y||x+y==8?"O":".");
}
Console.WriteLine();//请完善代码
}
{
for(int y=1;y<=7;y++)
{ Console.Write(x==y||x+y==8?"O":".");
}
Console.WriteLine();//请完善代码
}
最新回答 / weixin_慕码人3003085
bool其实就是“逻辑型”啦,有两个值,一个是真、是、对的"true",一个是假、非、错的"false",注意赋值都必须为小写字母。
2023-03-03
最新回答 / 慕村9069391
常用的有 char ,存储用 '' (单引号)括起来的一个字符string ,存储用“”(双引号)括起来的一串字符int ,存储整数double ,存储小数bool,true 和 false 表示。
2023-02-11
string temp;
temp = today;
today = tomorrow;
tomorrow = temp;
//请在这里补充代码,实现变量today和tomorrow的交换
temp = today;
today = tomorrow;
tomorrow = temp;
//请在这里补充代码,实现变量today和tomorrow的交换
最新回答 / weixin_慕九州3115940
{ int[] score = new int[] { 90, 65, 88, 70, 46, 81, 100, 68 }; string[] name = new string[] { "景珍", "林惠洋", "成蓉", "洪南昌", "龙玉民", "单江开", "田武山", "王三明" }; int sum = 0, avg = 0; for (int i = 0; i< score.Length; i+...
2022-12-04
最新回答 / weixin_慕仙0016014
你好,朋友!你的问题是标点符号不对在 ",高于平均分的有:\n"一句中英文引号内的逗号(,)和冒号(:)都是中文状态下,应该把它们改成英文状态下的逗号和冒号。
2022-11-21
hahahahahah 笑死我了
using System;
using System.Collections.Generic;
using System.Text;
namespace Test
{
class Program
{
static void Main(string[] args)
{
int x=1;
bool a = ++x * x > 3;
Console.WriteLine(a);
}
}
}
using System;
using System.Collections.Generic;
using System.Text;
namespace Test
{
class Program
{
static void Main(string[] args)
{
int x=1;
bool a = ++x * x > 3;
Console.WriteLine(a);
}
}
}
2022-11-08
最新回答 / 爱吃鱼焖豆腐的H先生
小问题,注意占位符方式一Console.Write("平均分是{1},{0}", "高于平均分的有: ", avg);方式二Console.Write("平均分是{0},高于平均分的有: ", avg);
2022-11-02