Professional Documents
Culture Documents
Thuhien HT23CLCB
Thuhien HT23CLCB
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace bai8
{
internal class Program
{
static void Main(string[] args)
{
int n;
n = int.Parse(Console.ReadLine());
if (n % 2 == 0)
Console.WriteLine("so {0} la so chan", n);
else
Console.WriteLine( "so {0} la so le");
Console.ReadKey();
}
}
BAI6
BAI3
string ptinh;
double kq1, kq = 0;
Console.Write("nhap chinh xac phep tinh can tinh +,-,*,:/,can ");
ptinh = Console.ReadLine();
if (ptinh == "can")
Console.Write("nhap phep toan hang = ");
double c = double.Parse(Console.ReadLine());
kq1 = Math.Sqrt(c);
Console.WriteLine("ket qua cua phep tinh can bac 2 cua {0} = {1} ", c, Math.Round(kq1, 4));
if (ptinh != "can")
Console.ReadKey();