Exemplo n.º 1
0
 static void Main(string[] args)
 {
     do
     {
         int n = SoNguyen.NhapSoNguyenDuong("Nhap n = ");
         Console.Write("S(" + n + ") = " + TinhToan.Tinh(n));
     } while (SoNguyen.NhapSoNguyen("\nTiep tuc(1.Tiep, 0.Khong)?") != 0);
 }
Exemplo n.º 2
0
 static void Main(string[] args)
 {
     do
     {
         int n;
         n = SoNguyen.NhapSoNguyenDuong("Nhap n=");
         Console.Write("Chu so lon nhat cua so " + n + " la " + TinhToan.tim(n));
     } while (SoNguyen.NhapSoNguyen("\nTiep tuc (1.Tiep, 0.Khong)") != 0);
 }
Exemplo n.º 3
0
 static void Main(string[] args)
 {
     do
     {
         int n;
         n = SoNguyen.NhapSoNguyenDuong("Nhap n=");
         Console.Write("Tong cac chu so chan cua " + n + " la " + TinhToan.tong(n));
     } while (SoNguyen.NhapSoNguyen("\nTiep tuc (1.Tiep, 0.Khong)") != 0);
 }
Exemplo n.º 4
0
 static void Main(string[] args)
 {
     do
     {
         int n;
         n = SoNguyen.NhapSoNguyenDuong("Nhap n = ");
         Console.Write("Tong tat cac uoc so nho hon chinh no la " + TinhToan.tonguoc(n));
     } while (SoNguyen.NhapSoNguyen("\nTiep tuc (1.Tiep, 0.Khong) ? ") != 0);
 }
Exemplo n.º 5
0
	static void Main(string[] args)
	{			
		do
		{
			int n;
			n=SoNguyen.NhapSoNguyenDuong("Nhap n = ");			
            Console.Write("Tich tat cac uoc so cua so nguyen duong "+n+" la "+TinhToan.tichuoc(n));
		} while (SoNguyen.NhapSoNguyen("\nTiep tuc (1.Tiep, 0.Khong) ? ")!=0);
	}
Exemplo n.º 6
0
 public static void Main(string[] args)
 {
     do
     {
         int n;
         n = SoNguyen.NhapSoNguyenDuong("Nhap so n:");
         Console.Write("\nS(" + n + ")=" + TinhToan.Tong(n));
     } while (SoNguyen.NhapSoNguyen("\nTiep tuc (1.Tiep, 0.Khong)") != 0);
 }
Exemplo n.º 7
0
 static void Main(string[] args)
 {
     do
     {
         float x = SoThuc.NhapSoThuc("Nhap x = ");
         int   n = SoNguyen.NhapSoNguyenDuong("Nhap n = ");
         Console.Write("T(" + x + "," + n + ") = " + TinhToan.Tinh(x, n));
     } while (SoNguyen.NhapSoNguyen("\nTiep tuc (1.Tiep, 0.Khong) ?") != 0);
 }
Exemplo n.º 8
0
 static void Main(string[] args)
 {
     do
     {
         int a, b;
         a = SoNguyen.NhapSoNguyenDuong("Nhap a = ");
         b = SoNguyen.NhapSoNguyenDuong("Nhap b = ");
         Console.Write("BCNN(" + a + "," + b + ") = " + TinhToan.bcnn(a, b));
     } while (SoNguyen.NhapSoNguyen("\nTiep tuc (1.Tiep, 0.Khong)") != 0);
 }
Exemplo n.º 9
0
 static void Main(string[] args)
 {
     do
     {
         int n;
         n = SoNguyen.NhapSoNguyenDuong("Nhap n = ");
         Console.Write("Uoc so le cua so nguyen duong " + n + "\n");
         TinhToan.lietke(n);
     } while (SoNguyen.NhapSoNguyen("\nTiep tuc (1.Tiep, 0.Khong) ? ") != 0);
 }
Exemplo n.º 10
0
    public static ArrayList Nhap_da_thuc()
    {
        ArrayList kq = new ArrayList();
        int       n;

        n = SoNguyen.NhapSoNguyenDuong("Da thuc co bao nhieu don thuc:");
        DON_THUC p;

        for (int i = 0; i < n; i++)
        {
            p = Nhap_don_thuc();
            kq.Add(p);
        }
        return(kq);
    }
Exemplo n.º 11
0
 static void Main(string[] args)
 {
     do
     {
         int n = SoNguyen.NhapSoNguyenDuong("Nhap n = ");
         if (TinhToan.ktdang2k(n))
         {
             Console.Write(n + " co dang 3^k");
         }
         else
         {
             Console.Write(n + " khong co dang 3^k");
         }
     } while (SoNguyen.NhapSoNguyen("\nTiep tuc (1.Tiep, 0.Khong)?") != 0);
 }
Exemplo n.º 12
0
 static void Main(string[] args)
 {
     do
     {
         int n;
         n = SoNguyen.NhapSoNguyenDuong("Nhap n = ");
         if (TinhToan.ktnt(n))
         {
             Console.Write(n + " la so nguyen to");
         }
         else
         {
             Console.Write(n + " khong la so nguyen to");
         }
     } while (SoNguyen.NhapSoNguyen("\nTiep tuc (1.Tiep, 0.Khong) ? ") != 0);
 }
Exemplo n.º 13
0
 static void Main(string[] args)
 {
     do
     {
         int n;
         n = SoNguyen.NhapSoNguyenDuong("Nhap n=");
         if (TinhToan.ktgiamdan(n))
         {
             Console.Write(n + " giam dan tu trai sang phai");
         }
         else
         {
             Console.Write(n + " khong giam dan tu trai sang phai");
         }
     } while (SoNguyen.NhapSoNguyen("\nTiep tuc (1.Tiep, 0.Khong)") != 0);
 }
Exemplo n.º 14
0
 static void Main(string[] args)
 {
     do
     {
         int n;
         n = SoNguyen.NhapSoNguyenDuong("Nhap n=");
         if (TinhToan.toanchan(n))
         {
             Console.Write(n + " toan chan");
         }
         else
         {
             Console.Write(n + " khong toan chan");
         }
     } while (SoNguyen.NhapSoNguyen("\nTiep tuc (1.Tiep, 0.Khong)") != 0);
 }