-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDoanTau.cs
48 lines (40 loc) · 1.11 KB
/
DoanTau.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BaiKiemTra
{
class DoanTau
{
int soLuongKhach;
string maDoanTau;
public void nhapMaDoanTau()
{
Console.WriteLine("Nhap Ma Doan Tau: ");
this.maDoanTau = Console.ReadLine();
Console.WriteLine("Nhap So Luong Khach Hang: ");
this.soLuongKhach =Convert.ToInt32(Console.ReadLine());
}
public float tinhTien()
{
float S = 0;
if (this.soLuongKhach<100)
{
S = this.soLuongKhach * 100000;
}
else
{
S = this.soLuongKhach * 80000;
}
return S;
}
public void inMatau()
{
Console.WriteLine(tinhTien());
Console.WriteLine("in ra ma doan tau 2 lan");
Console.WriteLine(this.maDoanTau);
Console.WriteLine(this.maDoanTau);
}
}
}