You are on page 1of 5

Bài 1:

using System;
class Program
{
static void Main(string[] args)
{
Console.WriteLine("*******");
Console.WriteLine("* *");
Console.WriteLine("* *");
Console.WriteLine("*******");
Console.ReadKey();
}
}

using System;
class Program
{
static void Main(string[] args)
{
Console.WriteLine(" * ");
Console.WriteLine(" * * ");
Console.WriteLine("* *");
Console.WriteLine("*******");
Console.ReadKey();
}
}
Bài 2:

using System;
class Program
{
static void Main(string[] args)
{
Console.WriteLine("F1:Nhap F5:Tim kiem theo ten");
Console.WriteLine("F2:Nhap them F6:Hien thi hoc sinh gioi");
Console.WriteLine("F3:Doc tep F7:Thong ke ");
Console.WriteLine("F4:Hien thi ESC:Thoat");
Console.Readline();

}
}
Bài 3:

using System;
class Program
{
static void Main(string[] args)
{
int a, b;
Console.Write("Nhap vao a:=");
a = int.Parse(Console.ReadLine());//Chuyển xâu thành số
Console.Write("Nhap vao b:=");
b = int.Parse(Console.ReadLine());
int tong = a + b;
Console.Write("Tong hai so a va b=" + tong);
Console.ReadKey();

Bài 4:

using system;
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Nhập họ và tên: ");
Console.WriteLine("Nhập tuổi: ");
Console.WriteLine("Nhập ngày sinh: ");
Console.WriteLine("Nhập địa chỉ: ");
Console.WriteLine("Nhập nghề nghiệp: ");
Console.WriteLine("Nhập sở thích: ");
Console.WriteLine("Nhập thông tin khác: ");
Console.ReadKey();
}
}
Bài 5:

using System;
class Program
{
static void Main(string[] args)
{
string tk;
string mk;
Console.Write("Tai khoan: ");
tk = Console.ReadLine();
Console.Write("Mat khau: ");
mk = Console.ReadLine();
Console.WriteLine("F1:Nhap F5:Tim kiem theo ten");
Console.WriteLine("F2:Nhap them F6:Hien thi hoc sinh gioi");
Console.WriteLine("F3:Doc tep F7:Thong ke ");
Console.WriteLine("F4:Hien thi ESC:Thoat");
Console.ReadKey();
}
}
Bài 3.2 tr65:

//Chương trình 3.2

using System;

namespace ChuongTrinh_3_2

class Program

static void Main(string[] args)

int a, b;

Console.Write("Nhap vao so nguyen a: ")

a = int.Parse(Console.ReadLine());

Console.Write("Nhap vao so nguyen b: ")

b = int.Parse(Console.ReadLine())

int Tong = a + b;

Console.Write("Tong hai so a va b la: " + Tong);

Console.ReadKey();

You might also like