第二次作业
GIT地址: https://github.com/1141813064
GIT用户名: 1141813064
学号后五位:62634
博客地址: https://home.cnblogs.com/u/baochongjing/
作业链接: https://edu.cnblogs.com/campus/xnsy/SoftwareEngineeringClass2/homework/2795
一、环境配置
1、使用以前安装的VS2017
2、根据提示安装git
二、运行代码
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
int n = int.Parse(Console.ReadLine());
Random x = new Random();
for (int i = 1; i < n; i++)
{
double a = x.Next(0, 100);
double b = x.Next(0, 100);
double c = x.Next(0, 100);
double result = 0;
int d = x.Next(1, 6);
switch (d)
{
case 1:
result = a * b + c;
if ( result > 0)
Console.WriteLine(a + "*" + b + "+" + c + "=");
break;
case 2:
result = a + b + c;
if ( result > 0)
Console.WriteLine(a + "+" + b + "+" + c + "=");
break;
case 3:
result = a / b - c;
if ( result > 0)
Console.WriteLine(a + "/" + b + "-" + c + "=");
break;
case 4:
result = a + b - c;
if (result > 0)
Console.WriteLine(a + "+" + b + "-" + c + "=");
break;
case 5:
result = a + b * c;
if(result > 0)
Console.WriteLine(a + "+" + b + "*" + c + "=");
break;
}
}
Console.ReadLine();
}
}
}
三、部分操作运行截图和结果截图
克隆项目
打开git执行命令
程序代码
执行结果
四、总结反思
1、刚刚接触git和GitHub,对它们的作用和使用方法都不太熟悉,应该多花点时间去了解并熟悉一些必要的简单的操作
2、很多以前的知识都忘记了,应多花点时间去重新学习一下