30809人加入学习
(83人评价)
C#编程-第一季-编程基础-宇宙最简单2021最新版

制作完成于2021年10月10日,使用Visual Studio 2019

价格 免费

项目名称

解决方案名称(可以用中文):一个解决方案下可以包含多个项目

目标框架:3.1长期支持

 

皮肤颜色主题:建议深色

字体、颜色:JetBrains Mono(每个符号等间距)

ctrl+滚轮:快速切换字号

默认显示【行号】

 

 

[展开全文]

创建工程时要注意的点:

1、控制台应用程序

2、控制台应用(区别:加了.net framework)

 

1运行时窗口会停住,点击任意处关闭

 

2 的初始代码没有helloworld

运行时候窗口会一闪而过

解决方案:

Main里面增加一条:

Console.ReadKey();

读取一个按键

[展开全文]

菜鸟教程、C#指南适合用来查阅

只查阅需要的部分,不要过于纠结细节。(学以致用)

[展开全文]

//输入整数n,输出n层三角形斜边
/*   *
    *
   *  */
int h = Convert.ToInt32(Console.ReadLine());
int H = h;
for (int i = 1; i < h+1; i++) //从大到小遍历
{
    for (int j = H; j > 0; j--)
    {
        Console.Write(" ");
    }
    Console.WriteLine("*");
    H--;
}

[展开全文]

计算机是什么?

人:身体+灵魂(思想、意识、思维)

计算机:硬件+软件

[展开全文]

计算机是什么?

人:身体+灵魂(思想、意识、思维)

计算机:硬件+软件

 

[展开全文]

计算机是什么?

人:身体+灵魂(思想、意识、思维)

计算机:硬件+软件

 

[展开全文]

int high = Convert.ToInt32(Console.ReadLine());
double zong = 0;//zong为一共经过的距离
int cishu = 1; //cishu为第几次落地
double tiao = high;//tiao为反弹高度
do { zong+=tiao*2; cishu++; tiao/=2;
    if (cishu == 4)
    {
        Console.WriteLine("反弹高度为" + tiao);
    }
} while (cishu <= 3);
Console.WriteLine(zong-high);

[展开全文]

转义:

\\——\

\' ——'

\"——"

\?——?

\a——Alert or bell

\b——Backspace

\f——Form feed

\n——Newline

\r——回车

\t——水平制表符tab

\v——垂直制表符tab

\ooo——一到三位的八进制数

\xhh...——一个或多个数字的十六进制数

[展开全文]

//练习2:2006年学院有80000人,每年增长25%,到哪一年人数达到20万。
int stu = 80000;
int year = 2006;
while (stu < 200000)
{
    stu = (stu * 125 )/ 100;
    year++;
}
Console.WriteLine(year);

[展开全文]

int n = Convert.ToInt32(Console.ReadLine());
int cyc = 0;
while (n > 1)
{
    if (n % 2 == 1) { n = 3 * n + 1; }
    else { n = n / 2; }
    cyc = cyc + 1;
}
Console.WriteLine(cyc);

[展开全文]

int n1 = Convert.ToInt32(Console.ReadLine());
int n2 = Convert.ToInt32(Console.ReadLine());
while (n2 >= n1)
{
    if (n2 % 2 == 0) { Console.WriteLine(n2); }
    n2--;
}
while (n2 <= n1)
{
    if (n1 % 2 == 0) { Console.WriteLine(n1); }
    n1--;
}

[展开全文]

你们的确定位置业务必须知道理解决定位置业务必须知道理解决定位置业务必须知道理解决定位置业务必须知道理解决定位置业务必须知

[展开全文]

int a = Convert.ToInt32(Console.ReadLine());
int b = Convert.ToInt32(Console.ReadLine());
int c = Convert.ToInt32(Console.ReadLine());
if (a > b)
{
    int max = a;
    a = b;
    b = max;
}
if (b > c)
{
    int max = b;
    b = c;
    c = max;
}
if (a > b)
{
    int max = a;
    a = b;
    b = max;
}
Console.WriteLine(a + " " + b + " " + c);

 

 double m = Convert.ToDouble(Console.ReadLine());
 int k = Convert.ToInt32(Console.ReadLine());
 if (k == 0)
 {
     int number = (int)m;
     Console.WriteLine(number);
 } else if (k==1) 
 {
     double number=((int)((m + 0.05) * 10)) / 10.0;
     Console.WriteLine(number);
 }

[展开全文]

授课教师

问问题加入A计划,有专门负责答疑的老师哦!!!

课程特色

下载资料(1)
视频(117)
图文(3)