提交 a1d63d03 编写于 作者: F feilong

增加C#第5题

上级 b6d096d3
{
"type": "code_options",
"author": "huanhuilong",
"source": "Calc.md"
}
\ No newline at end of file
# 四则运算
以下哪些四则运算都是对的?
一:
```csharp
int a = 1+2;
```
二:
```csharp
int b = 1.0m+2;
```
三:
```csharp
decimal b = 1.0m+2;
```
四:
```csharp
string c = ""+1+"."+"00002";
```
五:
```csharp
int number1(){ return 0;}
string number2() {return "2";}
string d = number1()+number2();
```
## 答案
```csharp
一、三、四、五
```
## 选项
### A
```csharp
一、二、三、四
```
### B
```csharp
一、二、三、五
```
### C
```csharp
二、三、五
```
......@@ -2,5 +2,7 @@
"node_id": "csharp-8891612a2ed349b4a04dee606c44a292",
"keywords": [],
"children": [],
"export": []
"export": [
"Calc.json"
]
}
\ No newline at end of file

int a = 1+2;
int b = 1.0m+2;
string c = 1+"."+"00002";
int number1(){ return 0;}
string number2() {return "2";}
string d = number1()+number2();
Console.WriteLine(a);
Console.WriteLine(b);
Console.WriteLine(c);
Console.WriteLine(d);
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册