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

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

价格 免费

练习1 

Console.WriteLine("请输入第一个整数");
  string str = Console.ReadLine();
  Console.WriteLine(str);
  int a = Convert.ToInt32(str);
  Console.WriteLine("请输入第2个整数");
  string str2 = Console.ReadLine();
  Console.WriteLine(str);
  int b = Convert.ToInt32(str2);
  Console.WriteLine("两个整数的和为" + (a + b));

练习2.1

Console.WriteLine("请输入第一个整数");
string str = Console.ReadLine();
Console.WriteLine(str);
double a = Convert.ToInt32(str);
Console.WriteLine("请输入第2个整数");
string str2 = Console.ReadLine();
Console.WriteLine(str);
double b = Convert.ToInt32(str2);
Console.WriteLine("两个整数的平均数是" + (a + b)/2);

练习2.2

Console.WriteLine("请输入总钱数");
string str = Console.ReadLine();
Console.WriteLine(str);
int a = Convert.ToInt32(str);
Console.WriteLine("请输入总人数");
string str2 = Console.ReadLine();
Console.WriteLine(str);
int b = Convert.ToInt32(str2);
Console.WriteLine("每个人可以分" + a/b+"元");

练习3

1 错  2 对 3 对 4错 5 对 6 错

练习4 

A

练习5 

A

[展开全文]

题1

            int a = Convert.ToInt32(Console.ReadLine());
            
            int b = Convert.ToInt32(Console.ReadLine());

            Console.WriteLine(a+b);

题2

            int a = Convert.ToInt32(Console.ReadLine());
            
            int b = Convert.ToInt32(Console.ReadLine());

            Console.WriteLine(a/b);

题3 

除了4 都正确

 

题4

 A

题5

A

[展开全文]

c#编程第一季

开始

字体,下载,安装(社区版)

 

 

HelloWarld

语句用;结束,注释添加 ctrl+k ctrl+c     取消 ctrl+k  ctrl+u   输出语句WriteLine   程序入口方法Main方法    

计算机基础知识     快捷键   字符

 

 

变量

数据类型

int是整数类型 char是字符类型 double是小数类型 string字符串类型 

 

变量的声明int age 

    命名规则 字母 数字(不能以数字开头) 下划线

变量先声明和初始化之后才可以使用

 

获取用户输入

Console.ReadLine

Convert.ToInt32

[展开全文]

static viod Main(string[] args)

    int a = Convert.ToInt32(C)

[展开全文]

int

double

char

srting

变量先声明int age

命名规则:字母,数字(不能开头)下划线

console.writeline

console.readline

 

 

[展开全文]

授课教师

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

课程特色

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