for (int y = 1; y <= 7; y++)
{
for (int x = 1; x <= 7; x++)
{
Console.Write(x);
}
Console.WriteLine();//换行
if(x==y)
continue;
}
{
for (int x = 1; x <= 7; x++)
{
Console.Write(x);
}
Console.WriteLine();//换行
if(x==y)
continue;
}
2017-06-28
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();//换行
}
这是最简单了吧
2017-06-27
{
for (int A = 1; A < 8; A++) {
for (int B = 1; B < 8; B++)
if (A == B || A == 8 - B)
Console.Write ("O");
else {
Console.Write (".");
}
Console.WriteLine ("");
}
}
}
}
for (int A = 1; A < 8; A++) {
for (int B = 1; B < 8; B++)
if (A == B || A == 8 - B)
Console.Write ("O");
else {
Console.Write (".");
}
Console.WriteLine ("");
}
}
}
}
string[,] a = 二维数组 int max = 0; for (int i = 0; i < a.GetLength(0); i++)
{if (int.Parse(a[i, 1]) > max) {
max = int.Parse(a[i, 1]); } } for (int x = 0; x < a.GetLength(0); x++){ if (int.Parse(a[x, 1]) == max) { Console.WriteLine("分数最高的是{0},分数是{1}", a[x, 0], max); break; } }
{if (int.Parse(a[i, 1]) > max) {
max = int.Parse(a[i, 1]); } } for (int x = 0; x < a.GetLength(0); x++){ if (int.Parse(a[x, 1]) == max) { Console.WriteLine("分数最高的是{0},分数是{1}", a[x, 0], max); break; } }
using System;
using System.Collections.Generic;
using System.Text;
namespace Test
{
class Program
{
static void Main(String[]args)
{
Console.WriteLine("今日事,今日毕。");
}
}
}
这样就可以,把class和static前面空格至最前,我交了可以了
using System.Collections.Generic;
using System.Text;
namespace Test
{
class Program
{
static void Main(String[]args)
{
Console.WriteLine("今日事,今日毕。");
}
}
}
这样就可以,把class和static前面空格至最前,我交了可以了
2017-06-26
提交也没报错,但是vs运行是一片空白
static void Main(string[] args)
{
for (int y = 1; y <= 7; y++)
{
for (int x = 7; x<=1; x--)
{
Console.Write(x);
}
Console.WriteLine();//换行
}
}
static void Main(string[] args)
{
for (int y = 1; y <= 7; y++)
{
for (int x = 7; x<=1; x--)
{
Console.Write(x);
}
Console.WriteLine();//换行
}
}
2017-06-26
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